I &#39;cheated&#39; and just fed the CSV data directly into the addRows() method. I converted HTML and Javascript into a template (HTML::Template) and the CSV file is read in from the filesystem.  Here&#39;s the template (online example: <a href="http://www.bixchange.com/cgi-bin/bixchange/bixchange.cgi?pom=test-gsapi;iid=0001">http://www.bixchange.com/cgi-bin/bixchange/bixchange.cgi?pom=test-gsapi;iid=0001</a> ):<div>
<br></div><div>&lt;html&gt; </div><div>  &lt;head&gt;</div><div>    &lt;script type=&quot;text/javascript&quot; src=&quot;<a href="http://www.google.com/jsapi">http://www.google.com/jsapi</a>&quot;&gt;&lt;/script&gt; </div>
<div>    &lt;script type=&quot;text/javascript&quot;&gt; </div><div> </div><div>      google.load(&quot;visualization&quot;, &quot;1&quot;, {packages:[&quot;corechart&quot;]});</div><div>      google.setOnLoadCallback(drawChart);</div>
<div>      </div><div>      function drawChart() {</div><div>           var data = new google.visualization.DataTable();</div><div>           data.addColumn(&#39;string&#39;, &#39;Year&#39;);</div><div>           data.addColumn(&#39;number&#39;, &#39;Sales&#39;);</div>
<div>        </div><div>           data.addRows([</div><div>              //[&#39;2004&#39;, 1000, 400],</div><div>              &lt;TMPL_LOOP NAME=&quot;data&quot;&gt;</div><div>               [&lt;TMPL_VAR NAME=&quot;Year&quot;&gt;,&lt;TMPL_VAR NAME=&quot;Fako_Num&quot;&gt;],</div>
<div>              &lt;/TMPL_LOOP&gt;</div><div>           ]);</div><div> </div><div>          var chart = new google.visualization.AreaChart(document.getElementById(&#39;chart_div&#39;));</div><div>         </div><div>          chart.draw(data, {</div>
<div>             width: 400, </div><div>             height: 300, </div><div>             title: &#39;Company Performance&#39;,  </div><div>             vAxis: {logScale: &#39;true&#39;},</div><div>             hAxis: {title: &#39;Year&#39;, titleColor:&#39;#FF0000&#39;}</div>
<div>          });</div><div> </div><div>      }</div><div>    </div><div><span class="Apple-tab-span" style="white-space:pre">        </span>&lt;/script&gt;    </div><div>  &lt;/head&gt;</div><div>  &lt;body&gt;</div><div>    &lt;h2&gt;Let&#39;s see our data first:&lt;/h2&gt;</div>
<div>    &lt;TABLE summary=&quot;fako data&quot; WIDTH=&quot;300px&quot; border=&quot;1&quot;&gt;</div><div>    &lt;TMPL_LOOP NAME=&quot;data&quot;&gt; </div><div>      &lt;tr&gt;</div><div>       &lt;td&gt;</div><div>           &lt;TMPL_VAR NAME=&quot;Year&quot;&gt;</div>
<div>       &lt;/td&gt;</div><div>       &lt;td&gt;</div><div>           &lt;TMPL_VAR NAME=&quot;Fako_Num&quot;&gt;</div><div>       &lt;/td&gt;</div><div>      &lt;/tr&gt;</div><div>    &lt;/TMPL_LOOP&gt;</div><div>    &lt;/TABLE&gt;</div>
<div><br></div><div><br></div><div>    &lt;!-- the chart goes below --&gt;</div><div><br></div><div>    &lt;div id=&quot;chart_div&quot;&gt;&lt;/div&gt;</div><div>  &lt;/body&gt;</div><div>&lt;/html&gt;</div><div> <br>I would imagine the JSON example is pretty much the exact same thing except you just create a separate template to push out JSON and return this back to a static HTML file pointing to its URL.  This is pretty elementary stuff, however...perhaps I&#39;m missing the problem here...?</div>
<div><br></div><div><br><div class="gmail_quote">On Sat, Jul 31, 2010 at 6:18 PM, Jay Strauss <span dir="ltr">&lt;<a href="mailto:me@heyjay.com">me@heyjay.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hi, I&#39;m double posting (on luni), but since these lists only partially<br>
overlap, I thought someone here might know (hopefully)<br>
<br>
I&#39;m struggling to use a line chart with Google visualization. Its very<br>
possible I don&#39;t have a clue as to what I&#39;m doing. I&#39;ve been reading docs<br>
and searching google but cant find why I can&#39;t get this to work.<br>
<br>
I can get a basic example to work where the data table is populated by<br>
javascript within the page.<br>
<br>
<a href="http://luni.heyjay.com:55555/works.html" target="_blank">http://luni.heyjay.com:55555/works.html</a><br>
<br>
But I&#39;d like the data to come from the server in the form of a CSV file<br>
(I&#39;ll work on delivering a JSON string for later). Here is the CSV file:<br>
<br>
<a href="http://luni.heyjay.com:55555/data.csv" target="_blank">http://luni.heyjay.com:55555/data.csv</a><br>
<br>
and here is the page that&#39;s trying to render the graph using the CSV file:<br>
<br>
<a href="http://luni.heyjay.com:55555/with_csv.html" target="_blank">http://luni.heyjay.com:55555/with_csv.html</a><br>
<br>
All of the above links should work, I figured rather than post a bunch of<br>
source code and make this email huge, you can just &quot;view source&quot; from the<br>
link<br>
<br>
Any help would be very much appreciated.<br>
<br>
Thanks<br>
Jay<br>
_______________________________________________<br>
Chicago-talk mailing list<br>
<a href="mailto:Chicago-talk@pm.org">Chicago-talk@pm.org</a><br>
<a href="http://mail.pm.org/mailman/listinfo/chicago-talk" target="_blank">http://mail.pm.org/mailman/listinfo/chicago-talk</a><br>
</blockquote></div><br><br clear="all"><br>-- <br>Sincerely,<br><br><br>Joel Limardo<br>Chief Software Engineer<br>ForwardPhase Technologies, LLC <br>401 N. Michigan Avenue<br>Suite 1200-10<br>Chicago, IL 60611<br><a href="http://www.forwardphase.com">www.forwardphase.com</a><br>
<a href="mailto:joel.limardo@forwardphase.com">joel.limardo@forwardphase.com</a><br>LinkedIn: <a href="http://www.linkedin.com/in/joellimardo">http://www.linkedin.com/in/joellimardo</a><br>Twitter: <a href="http://twitter.com/joellimardo">http://twitter.com/joellimardo</a><br>
Fax: 815-346-9495<br>Ph : 877-321-5467<br>
</div>