<?xml version="1.0" encoding="utf-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: Dynamic Stat Graphs in Rails</title>
	<atom:link href="http://www.igvita.com/2007/01/05/dynamic-stat-graphs-in-rails/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.igvita.com/2007/01/05/dynamic-stat-graphs-in-rails/</link>
	<description>A goal is a dream with a deadline.</description>
	<pubDate>Thu, 20 Nov 2008 23:07:12 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
		<item>
		<title>By: Scott</title>
		<link>http://www.igvita.com/2007/01/05/dynamic-stat-graphs-in-rails/#comment-103105</link>
		<dc:creator>Scott</dc:creator>
		<pubDate>Fri, 09 May 2008 23:00:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.igvita.com/blog/2007/01/05/dynamic-stat-graphs-in-rails/#comment-103105</guid>
		<description>Just wanted to say thank you. This was very helpful in explaining things - especially how to pull the keys out dynamically for the hash.</description>
		<content:encoded><![CDATA[<p>Just wanted to say thank you. This was very helpful in explaining things - especially how to pull the keys out dynamically for the hash.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ilya Grigorik</title>
		<link>http://www.igvita.com/2007/01/05/dynamic-stat-graphs-in-rails/#comment-100989</link>
		<dc:creator>Ilya Grigorik</dc:creator>
		<pubDate>Sat, 12 Jan 2008 19:01:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.igvita.com/blog/2007/01/05/dynamic-stat-graphs-in-rails/#comment-100989</guid>
		<description>Thanks for the tip Tim.. And indeed, scruffy is an awesome package. I built my '&lt;a href="http://www.igvita.com/2006/12/11/visual-database-explorer-in-ruby/" rel="nofollow"&gt;Visual Database Explorer&lt;/a&gt;' with it, and it worked just great.</description>
		<content:encoded><![CDATA[<p>Thanks for the tip Tim.. And indeed, scruffy is an awesome package. I built my &#8216;<a href="http://www.igvita.com/2006/12/11/visual-database-explorer-in-ruby/" rel="nofollow">Visual Database Explorer</a>&#8216; with it, and it worked just great.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tim waters</title>
		<link>http://www.igvita.com/2007/01/05/dynamic-stat-graphs-in-rails/#comment-100919</link>
		<dc:creator>tim waters</dc:creator>
		<pubDate>Tue, 08 Jan 2008 21:03:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.igvita.com/blog/2007/01/05/dynamic-stat-graphs-in-rails/#comment-100919</guid>
		<description>this is a bug with gruff.  From what i recall, it occurs with every odd row (I was using stacked bar graph).
There was a fix online to fix it, and it may have been patched now but Gruff still gives inaccurate stacked bar graphs so now I use Scruffy which blows the socks off Gruff.
http://scruffy.rubyforge.org/</description>
		<content:encoded><![CDATA[<p>this is a bug with gruff.  From what i recall, it occurs with every odd row (I was using stacked bar graph).<br />
There was a fix online to fix it, and it may have been patched now but Gruff still gives inaccurate stacked bar graphs so now I use Scruffy which blows the socks off Gruff.<br />
<a href="http://scruffy.rubyforge.org/" rel="nofollow">http://scruffy.rubyforge.org/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ilya Grigorik</title>
		<link>http://www.igvita.com/2007/01/05/dynamic-stat-graphs-in-rails/#comment-100707</link>
		<dc:creator>Ilya Grigorik</dc:creator>
		<pubDate>Thu, 27 Dec 2007 04:57:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.igvita.com/blog/2007/01/05/dynamic-stat-graphs-in-rails/#comment-100707</guid>
		<description>Andrew, I've never ran into that problem before. Have you validated your SQL queries? Looking at the Ruby code, I can't see why this problem would come up...</description>
		<content:encoded><![CDATA[<p>Andrew, I&#8217;ve never ran into that problem before. Have you validated your SQL queries? Looking at the Ruby code, I can&#8217;t see why this problem would come up&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andrew</title>
		<link>http://www.igvita.com/2007/01/05/dynamic-stat-graphs-in-rails/#comment-98767</link>
		<dc:creator>Andrew</dc:creator>
		<pubDate>Sun, 16 Dec 2007 12:35:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.igvita.com/blog/2007/01/05/dynamic-stat-graphs-in-rails/#comment-98767</guid>
		<description>Hi Illya. It seems that when more than 5 different data points exist (e.g. 2006-07,  2006-08,  2006-09,  2006-10,  2006-11,  2006-12), the graph messes up. The data starts scattering randomly across the graph.

Has that been your case as well, and do you know of a fix for that issue?</description>
		<content:encoded><![CDATA[<p>Hi Illya. It seems that when more than 5 different data points exist (e.g. 2006-07,  2006-08,  2006-09,  2006-10,  2006-11,  2006-12), the graph messes up. The data starts scattering randomly across the graph.</p>
<p>Has that been your case as well, and do you know of a fix for that issue?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ilya Grigorik</title>
		<link>http://www.igvita.com/2007/01/05/dynamic-stat-graphs-in-rails/#comment-86217</link>
		<dc:creator>Ilya Grigorik</dc:creator>
		<pubDate>Wed, 14 Nov 2007 03:07:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.igvita.com/blog/2007/01/05/dynamic-stat-graphs-in-rails/#comment-86217</guid>
		<description>Bene, a simple way would be to first create a hash or an array of 365 items and map each entry to '0'. Then, simply iterate throughout the array and change any non-zero values to their proper counts. 

You might want look at 'srtftime' method, it'll help you convert any date into a 0...365 numeral.</description>
		<content:encoded><![CDATA[<p>Bene, a simple way would be to first create a hash or an array of 365 items and map each entry to &#8216;0&#8242;. Then, simply iterate throughout the array and change any non-zero values to their proper counts. </p>
<p>You might want look at &#8217;srtftime&#8217; method, it&#8217;ll help you convert any date into a 0&#8230;365 numeral.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bene</title>
		<link>http://www.igvita.com/2007/01/05/dynamic-stat-graphs-in-rails/#comment-85917</link>
		<dc:creator>Bene</dc:creator>
		<pubDate>Tue, 13 Nov 2007 16:46:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.igvita.com/blog/2007/01/05/dynamic-stat-graphs-in-rails/#comment-85917</guid>
		<description>Ilya, I have a question about your approach. I am a rails newbie and too weak to find it our myself.

I want to use Gruff to draw a bar chart of order subtotals per day for the last 365 days. Even on days with zero orders, these should be included with no bar in the graph, so the width.

How would I have to change above code to draw a "365 days in the past" canvas, and then assign the subtotal values for the days where they apply, or 0 for days without orders.

I know it's probably very easy to do in Ruby / Rails, but I  am used to messy PHP and don't want to inject that messiness into my Ruby code. 

Lazy, I know ;-) but I tried for a few hours now with no success.</description>
		<content:encoded><![CDATA[<p>Ilya, I have a question about your approach. I am a rails newbie and too weak to find it our myself.</p>
<p>I want to use Gruff to draw a bar chart of order subtotals per day for the last 365 days. Even on days with zero orders, these should be included with no bar in the graph, so the width.</p>
<p>How would I have to change above code to draw a &#8220;365 days in the past&#8221; canvas, and then assign the subtotal values for the days where they apply, or 0 for days without orders.</p>
<p>I know it&#8217;s probably very easy to do in Ruby / Rails, but I  am used to messy PHP and don&#8217;t want to inject that messiness into my Ruby code. </p>
<p>Lazy, I know ;-) but I tried for a few hours now with no success.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bene</title>
		<link>http://www.igvita.com/2007/01/05/dynamic-stat-graphs-in-rails/#comment-85910</link>
		<dc:creator>Bene</dc:creator>
		<pubDate>Tue, 13 Nov 2007 16:21:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.igvita.com/blog/2007/01/05/dynamic-stat-graphs-in-rails/#comment-85910</guid>
		<description>I am very impressed with your solution to make the x-axis consisten even for 0 counts. This blog is super-helpful. Thanks again.</description>
		<content:encoded><![CDATA[<p>I am very impressed with your solution to make the x-axis consisten even for 0 counts. This blog is super-helpful. Thanks again.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Fred</title>
		<link>http://www.igvita.com/2007/01/05/dynamic-stat-graphs-in-rails/#comment-70794</link>
		<dc:creator>Fred</dc:creator>
		<pubDate>Fri, 21 Sep 2007 14:20:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.igvita.com/blog/2007/01/05/dynamic-stat-graphs-in-rails/#comment-70794</guid>
		<description>Wow, very nice work...
even more impressive is the Link by Chad.
http://www.maani.us/xml_charts/index.php

really impressed with the 3D charts and the composite ones...</description>
		<content:encoded><![CDATA[<p>Wow, very nice work&#8230;<br />
even more impressive is the Link by Chad.<br />
<a href="http://www.maani.us/xml_charts/index.php" rel="nofollow">http://www.maani.us/xml_charts/index.php</a></p>
<p>really impressed with the 3D charts and the composite ones&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: grafici per rails con gruff at Cr15 D1Scla W3bl0g</title>
		<link>http://www.igvita.com/2007/01/05/dynamic-stat-graphs-in-rails/#comment-49651</link>
		<dc:creator>grafici per rails con gruff at Cr15 D1Scla W3bl0g</dc:creator>
		<pubDate>Thu, 05 Jul 2007 13:49:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.igvita.com/blog/2007/01/05/dynamic-stat-graphs-in-rails/#comment-49651</guid>
		<description>[...] #GENIALATA thanks to igvita.com # first, we will take the union of the date arrays and sort our results # ex: [1,2] &#124; [2,3] =&#62; [1, 2, 3] # months = (@users.keys &#124; @votes.keys &#124; @bookmarks.keys).sort [...]</description>
		<content:encoded><![CDATA[<p>[...] #GENIALATA thanks to igvita.com # first, we will take the union of the date arrays and sort our results # ex: [1,2] | [2,3] =&gt; [1, 2, 3] # months = (@users.keys | @votes.keys | @bookmarks.keys).sort [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>
