Plot Over Time - Extended

By : unknown

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:

[plot_ext field1="Heart Rate" type="BarChart"]

Height / Width: You can set your own width and height for the chart with Width and Height (default: 400 X 300). Don't change the height or width using the options="height: ", instead use height="300" or similar. Changing it in the options that are passed to the graph won't change the size of the div it exists in.

[plot_ext field1="Heart Rate" width="500" height="300"] 

Data Limits: By default, Plot Over Time uses ALL data from all posts and pops it onto a graph. You can limit it with two options:

1. You can determine the maximum number of days worth of data (starting from now and going backward) with maxdays. This would show a one month span of data:

[plot_ext field1="Heart Rate" maxdays="30"]

2. You can attach a graph to that post's published date with usepostdate:

[plot_ext field1="Heart Rate" usepostdate="true"]

So if the post was 3 weeks old, it would only show data from it's publication date of three weeks ago and older - this allows you to see changes post by post!

Dates: The date format defaults to m/d/y - IE, 12/31/11. You can change it with dateformat. This would instead put 2011-12-31 on the graph:

[plot_ext field1="Heart Rate" dateformat="Y-m-d"]

Titles: This would add a title above your graph that reads "My Graph!".

[plot_ext field1="Heart Rate" options="'title': 'My Graph!'" chart_num="1"]

Wrapping Up: Don't like the colors of the graph, or want to add a few new options? No problem - any Google Visualization Tools options is available using the option parameters.

More Info: For more information on the options available visit the Google Chart Tools homepage: http://code.google.com/apis/chart/index.html

Rules:

1. If you define 5 fields you want to read from, and a post only had four fields? It's going to ignore you.

2. It doesn't do data interpolation. If there's a gap in your data, it simply ignores it - it doesn't give it a "0", it just plain doesn't plot it. (That's how he wanted it. Other opinions may differ - mine does not.)

3. f you tell it you want to see 30 days of data, and you've only got three days of data in your posts? It's only going to show a graph that spans three days.

All data integrity is up to you.

If you download, please rate the plugin. This is one of the few feedback methods available. If you have a low opinion, please allow me to try to fix it first before leaving a bad review.

Plot Over Time

I ran across Tom Fotherby's Fotherplot when I was looking for a slick way to set up graphs for a workout log. Being the type that can't stand to leave things alone, I had to hack on it a bit to change a few things… upgrade it to the most modern version of Google Chart Tools, add multiple data point.........

Similar: 86%

Fotherplot

After working out how to plot time-based data using Google charts API, I created a WordPress plugin to plot values stored in a custom field against the published-on date of WordPress blog posts that use the field....

Similar: 75%

Simple Graph

Draws a graph of single set of date related data. Graph can be made public (i.e. sidebar widget or static page) and the data can be manipulated through dashboard. Many people use this plugin for weight tracking on their blogs (as do I), but it has been used for many other things as well. Only requir.........

Similar: 50%

RJ Quickcharts

Build Complex, Powerful HTML5 Charts in Just Minutes. RJ Quick Charts is the only WordPress plugin available that allows users to easily enter data that is immediately built out into a chart below as they type. Quick Charts uses all native WordPress UI so it feels right at home without adding any e.........

Similar: 29%

jqVisualize

This plugin gives you an easy way to use the Visualize jQuery plugin into WordPress. It will build bar charts, line charts, area charts and pie charts scrapping the data of tables you include into your posts. Charts are built using the HTML5 canvas element....

Similar: 27%

Charts Ninja: Create and add Chart & Graphs to your website on-the-fly

ChartsNinja Charts Ninja is a super powerful tool for adding beautiful graphs and charts to your website. Charts Ninja's charts are responsive, meaning, they will be displayed properly on all devices including smartphones, tablets, laptops, and desktop computers. See thousands of graphs and charts .........

Similar: 24%

WordPress Charts

Create amazing HTML5 charts easily in WordPress. A flexible and lightweight WordPress chart plugin including 6 customizable chart types (line, bar, pie, radar, polar area and doughnut types) as well as a fallback to provide support for older IE. Incorporates the fantastic chart.js script : http://w.........

Similar: 24%

Visualizer: Charts and Graphs

WordPress Visualizer plugin is a simple, easy to use and quite powerful tool to create, manage and embed interactive charts into your WordPress posts and pages. The plugin uses Google Visualization API to render charts, which support cross-browser compatibility (adopting VML for older IE versions) .........

Similar: 18%

WP Beautiful Charts

Create beautiful charts for your webiste or blog. Here some exemples : http://www.info-d-74.com/wp-beautiful-charts-demos/...

Similar: 17%

Data Browser

Demo live example link : http://wide-soft.com/data-browser-customized/ Advanced Analyzer for Site Data DataBrowser is a premium multi-purpose system for analyzing/browsing data, based on the real existing data on your WordPress site. you can build chart based on taxonomies so this plugin can us.........

Similar: 8%