{"id":15791,"date":"2011-11-22T13:01:04","date_gmt":"2011-11-22T13:01:04","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/plot-over-time\/"},"modified":"2011-11-22T16:19:14","modified_gmt":"2011-11-22T16:19:14","slug":"plot-over-time","status":"publish","type":"plugin","link":"https:\/\/ewe.wordpress.org\/plugins\/plot-over-time\/","author":4027991,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"1.0.0","stable_tag":"trunk","tested":"3.2.1","requires":"3.0","requires_php":"","requires_plugins":"","header_name":"Plot Over Time","header_author":"Davis Ray Sickmon, Jr","header_description":"","assets_banners_color":"","last_updated":"2011-11-22 16:19:14","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"http:\/\/www.midnightryder.com\/wordpress-plugins\/plot-over-time-for-wordpress","header_author_uri":"http:\/\/www.midnightryder.org","rating":5,"author_block_rating":0,"active_installs":10,"downloads":2236,"num_ratings":1,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":[],"upgrade_notice":[],"ratings":{"1":0,"2":0,"3":0,"4":0,"5":"1"},"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":[],"block_files":[],"assets_screenshots":{"screenshot-2.png":{"filename":"screenshot-2.png","revision":"1539332","resolution":"2","location":"plugin"},"screenshot-3.png":{"filename":"screenshot-3.png","revision":"1539332","resolution":"3","location":"plugin"},"screenshot-1.png":{"filename":"screenshot-1.png","revision":"1539332","resolution":"1","location":"plugin"}},"screenshots":{"1":"Example of AreaGraph formatted data","2":"Example of LineChart formatted data","3":"Example of the PieChart formatted data"},"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[2510,2010,30850,2509,30851],"plugin_category":[],"plugin_contributors":[94634],"plugin_business_model":[],"class_list":["post-15791","plugin","type-plugin","status-publish","hentry","plugin_tags-chart","plugin_tags-custom-fields","plugin_tags-google-chart-api","plugin_tags-graph","plugin_tags-weight-tracking","plugin_contributors-midnightryder","plugin_committers-midnightryder"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/plot-over-time.svg","icon_2x":false,"generated":true},"screenshots":[{"src":"https:\/\/ps.w.org\/plot-over-time\/trunk\/screenshot-1.png?rev=1539332","caption":"Example of AreaGraph formatted data"},{"src":"https:\/\/ps.w.org\/plot-over-time\/trunk\/screenshot-2.png?rev=1539332","caption":"Example of LineChart formatted data"},{"src":"https:\/\/ps.w.org\/plot-over-time\/trunk\/screenshot-3.png?rev=1539332","caption":"Example of the PieChart formatted data"}],"raw_content":"<!--section=description-->\n<p>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\u2026 upgrade it to the most modern version of Google Chart Tools, add multiple data points, etc\u2026 until finally, well\u2026 I think the only thing left of the original plugin is the GNU license.<\/p>\n\n<p>Want to see it in action?  I'm using it in http:\/\/www.midnightryder.org\/category\/workout-log\/<\/p>\n\n<p>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.<\/p>\n\n<p>You'll need at lest two posts with data in them before Plot Over Time can do it's thing - so add data to another post.<\/p>\n\n<p>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:<\/p>\n\n<pre><code>[plotovertime field1=\"Heart Rate\"]\n<\/code><\/pre>\n\n<p>This will go through all posts that have a custom field called \"Heart Rate\" and plot them on a nice Google Chart Tools LineChart.  If you wanted to work with more points of data, simply add more Custom Fields:<\/p>\n\n<pre><code>[plotovertime field1=\"Heart Rate\" field2=\"Weight\" field3=\"Workout Time\"]\n<\/code><\/pre>\n\n<p>Plot Over Time support up to 10 fields per graph.<\/p>\n\n<p>The legend is automatically added, and each datapoint is able to be clicked to get a callout about it's datapoint.  If you want to get rid of the legend:<\/p>\n\n<pre><code>[plotovertime field1=\"Heart Rate\" legend=\"none\"]\n<\/code><\/pre>\n\n<p>Or you can move the legend around with legend=\"left\" or legend=\"right\".<\/p>\n\n<p>To use other types of graphs:<\/p>\n\n<pre><code>[plotovertime field1=\"Heart Rate\" type=\"BarChart\"]\n<\/code><\/pre>\n\n<p>Valid types chart types for Plot Over Time are:  AreaChart, LineChart, PieChart (not particularly useful in this implementation), BarChart, and ColumnChart.<\/p>\n\n<p>You can set your own width and height for the chart with Width and Height:<\/p>\n\n<pre><code>[plotovertime field1=\"Heart Rate\" width=\"500\" height=\"300\"] \n<\/code><\/pre>\n\n<p>By default, Plot Over Time uses ALL data from all posts and pops it onto a graph.  You can limit it with two options:<\/p>\n\n<p>1)  You can determine the maximum number of days worth of data (starting from now and going backwards) with maydays:<\/p>\n\n<pre><code>[plotovertime field1=\"Heart Rate\" maxdays=\"30]\n<\/code><\/pre>\n\n<p>This would show a one month span of data.<\/p>\n\n<p>2)  You can attach a graph to that post's published date with usepostdate:<\/p>\n\n<pre><code>[plotovertime field1=\"Heart Rate\" usepostdate=\"true\"]\n<\/code><\/pre>\n\n<p>So if the post was 3 weeks old, it would only show data from it's publication date of three weeks ago and older.<\/p>\n\n<p>The date format defaults to m\/d\/y - IE, 12\/31\/11.  You can change it with dateformat:<\/p>\n\n<pre><code>[plotovertime field1=\"Heart Rate\" dateformat=\"Y-m-d\"]\n<\/code><\/pre>\n\n<p>Would instead put 2011-12-31 on the graph.<\/p>\n\n<p>And finally:  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 parameter:<\/p>\n\n<pre><code>[plotovertime field1=\"Heart Rate\" options=\"title: 'My Cool Graph!';\"]\n<\/code><\/pre>\n\n<p>This would add a title above your graph that reads \"My Cool Graph!\".  Note - 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.<\/p>\n\n<p>For more information on the options available visit the Google Chart Tools homepage: http:\/\/code.google.com\/apis\/chart\/index.html<\/p>\n\n<p>And of course, you can mix and match any of the shortcode commands in any way you want.  have fun!<\/p>\n\n<p>Now, about that data\u2026 you'll want to know a couple of rules.<\/p>\n\n<p>First, if you define 5 fields you want to read from, and a post only had four fields?  It's going to ignore you.<\/p>\n\n<p>Second, 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 I wanted it.  Other opinions may differ.)<\/p>\n\n<p>Third, if 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.<\/p>\n\n<p>All data integrity is up to you.<\/p>\n\n<p>And it will pull data from ALL posts, not just posts in a specific category.  For future updates I'll probably add a category field that allows you to pull data from a single category.<\/p>\n\n<p>This plugin is a quick \"one off\" I did for myself - it's not nearly as pretty or efficient as it could be, and I'll probably do some refactoring on it in the future if there's any interest.  Plus, there's probably a couple of other things I'll add down the road as the whim strikes.<\/p>\n\n<!--section=installation-->\n<ol>\n<li>Download the Plot Over Time plugin and you will get a directory called \"plotovertime\" when you unzip the downloaded file. Upload the \"plotovertime\" directory to your wordpress plugins directory (e.g. <code>\/wp-content\/plugins\/<\/code>)<\/li>\n<li>Activate the plugin through the 'Plugins' menu in the Wordpress dashboard.<\/li>\n<\/ol>\n\n<!--section=faq-->\n<p>None, yet.<\/p>\n\n<!--section=changelog-->\n<p>Verison 1.0, November 18, 2011  - Initial Release<\/p>","raw_excerpt":"Uses the Google Chart Tools API for charting data in posts.  Tracks up to 10 different data points, 4 chart types, &amp; lots of customization.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/ewe.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/15791","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ewe.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/ewe.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/ewe.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=15791"}],"author":[{"embeddable":true,"href":"https:\/\/ewe.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/midnightryder"}],"wp:attachment":[{"href":"https:\/\/ewe.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=15791"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/ewe.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=15791"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/ewe.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=15791"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/ewe.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=15791"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/ewe.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=15791"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/ewe.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=15791"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}