Plot Over Time – Extended
I have used Plot Over Time for a long time when found that I needed to put multiple charts on one page and category restrictions. The plugin did not allow it. I am insistent on not needing a new plugin – as this one has worked just fine for me… So, I made changes. My first change is small in user ef
I have used Plot Over Time for a long time when found that I needed to put multiple charts on one page and category restrictions. The plugin did not allow it. I am insistent on not needing a new plugin – as this one has worked just fine for me… So, I made changes.
My first change is small in user effort, but large in execution… I added an optional parameter for chart_num. This optional parameter is not needed if you are using the plugin for a single chart page. It is only needed to identify what chart you are making on a multi-chart page…
Single chart on a page…
[plot_ext field1="Heart Rate"]
Multi-Chart page…
[plot_ext field1="Heart Rate" chart_num="1"] [plot_ext field1="Blood Pressure" chart_num="2"]
Want to see it in action? http://www.ourroadtohealth.com/index.php/data-collection/total-blood-pressure/
My second change… I added an optional parameter for post category restriction. This optional parameter is not needed if you are pulling from all post categories. It is only needed to identify what 1 post category you want to limit the data to…
Single chart on a page with category selection…
[plot_ext field1="Heart Rate" post_cat="8"]
Let’s Get Started:
1. To get it up and running: first, you’ll need to put data in your posts. So, in a post, go to the section under your post called “Custom Fields”. Create a field you want to track (for instance, “Heart Rate”) and give it a value.
2. You’ll need at lest two posts with data in them before the plugin can do it’s thing – so add data to another post.
3. Now that you have at least two posts with data, you can create a post that creates a graph. For this example, you could simply use:
[plot_ext field1="Heart Rate"]
This will go through all posts that have a custom field called “Heart Rate” and plot them on a nice Google Chart Tools LineChart. Plot Over Time – Extended supports up to 10 fields per graph. If you wanted to work with more points of data (again, up to 10), simply add more Custom Fields:
[plot_ext field1="Heart Rate" field2="Weight" field3="Workout Time"]
The legend is automatically added, and each datapoint is able to be clicked to get a callout about it’s datapoint. Or you can move the legend around with legend=”left” or legend=”right”. If you want to get rid of the legend:
[plot_ext field1="Heart Rate" legend="none"]
Types: Valid types chart types for Plot Over Time are: AreaChart, LineChart, PieChart (not particularly useful in this implementation), BarChart, and ColumnChart. To use other types of graphs: