Top Infobar Text

Close Icon
   
Contact Info     (919) 701-9304

Chart Progress Part1

Last week I broke down the Chart Project into three milestones. The first one:

Create a page to efficiently display real-time incoming data

This week I concentrated on the “efficiently” part of that requirement and have put off the “real-time incoming data” part until next week. I will summarize the progress here:

  1. I installed this plugin: Ninja Page Categories and Tags. This allows me to add categories to static pages in WordPress. This will come in handy because I only want to load certain scripts for certain types of pages.
  2. Then I added the following code into my theme specific “functions.php”graphFunctionNote that the category needs to be “Test Charts” in order for both scripts to load/execute. The ‘highcharts’ script is provided by HighCharts JS.
  3. I found the ‘firstchart’ script either on a forum or example from HighCharts. It was suggested that I put it in the header for all pages, but this would violate the “efficiently” requirement mentioned above. Instead I broke it out into its own JS file located at the path shown above.
  4. Now all that is required for a page (or post for that matter) to use HighCharts is the following:
    1. Select the category as the type of chart you want. I have defined “Test Charts” above.
    2. Place the chart in the post as follows:chartContainerNote that the location is named container above. This is pointed to by firstchart.js

That summarizes where we are now. Here’s our test chart:

Shares
Post Tagged with , ,

3 Responses on “Chart Progress Part1

  1. fghj says:

    nicely done.

  2. Kyle says:

    I’m sincerely impressed. No…seriously.

  3. Barbara says:

    A very impressive documentation of progress! The interactive chart is extremely engaging.

Leave a Reply

Your email address will not be published. Required fields are marked *

Share This