Written by nitinpai on January 9th, 2008
Impressive Google Chart Generator Scripts
A few days ago, I had written a post that the Google Chart API had a lot of power when you wanted simple and quick results for displaying charts in your website. I had also written a tutorial on how to go about creating a chart. But there was a certain shortcoming in the tutorial. It was tedious. It required you to create lengthy URL’s and also properly format the URL’s to get the chart.
But by the time I had written about the API, I noticed that people were coming up with great new ideas in order to reduce the burden of making the chart. And the ideas are practically impressive and have great scope for improvement.
<table class=”tochart size300x100 color990000” summary=”Browsers for this site, March 2007“>
<tr><th scope=”col”>Browser</th><th scope=”col”>Percent</th></tr>
The script pulls up all the tables present in the page which have the class set to “tochart” and puts up Google API generated charts in their place. Smart, isn’t it?
An Online Utility
The above script would definitely save your time in making the charts, but it is only created for a single type of chart, namely, the 3D pie chart. But if you require other comprehensive charts then you would have to make use of an chart generator developed by Jon Winstanley. It is a put-values-get-chart utility which makes the chart making process even more simpler. The utility takes care of all the factors required for a chart and also allows to create all types of charts.
But one element which goes as a negative aspect of this utility is that it is not flexible. You put in the value, get the encoded URL and then use it in your web page. Eventually, if you want to modify the chart later you would have to undergo the same process of putting in values again.
What I would like to see is, an implementation of both the above aspects. That is, have the put-values-get-chart utility but at the same time it should generate some XML format like the HTML table which should then used to generate the chart. In this fashion we would be able to modify the chart as and when required. Does it sound like the need of Google Chart Framework?