Quantcast
Channel: OneOfSix - webtools
Viewing all articles
Browse latest Browse all 4

Google Charts API Released

$
0
0
Update:  Well, it didn't take long before someone coded up an ASP.NET wrapper control around the chart API.  Check out Christopher Pietschmann's blog for an overview on how he did it.  Nice work!

Via dotNETKicks, I learned this morning that Google has put out an API for rendering chart images to the browser by using URL arguments, in much the same manner as Edward Tufte's SparkLines concept.  Whereas Sparklines are intended for presenting "small, word-sized" graphics, like stock charts:

sparkline_graphs

Google's API permits the creation of larger charts of various types, with an array of graphic effects:

The above chart was created using this simple URL:

http://chart.apis.google.com/chart?
chs=200x125&chd=s:helloWorld&cht=lc&
chxt=x,y&chxl=0:|Mar|Apr|May|June|July|1:||50+Kb&
chf=c,lg,90,76A4FB,0.5,ffffff,0|bg,s,EFEFEF

chs: Chart Size
s: Data Series - in this case, sample data from Google;  this can be encoded data for small or large datasets
cht: Chart Type - lc = line chart
chxt: Required axes labels for chart
chxl:  X and Y axis labels
chf:  Chart Area Background Fill - in this case, we've applied a horizontal, gradient fill

Here's a 3-D Pie:

And the URL that was used to create it:

http://chart.apis.google.com/chart?
cht=p3&chs=600x270&chd=s:Hellobla&
chl=May|Jun|Jul|Aug|Sep|Oct&chco=0000ff

The API has a whack of options for making all manner of charts, including scatter plots, 3-D pies, Venn diagrams, and more.  I wish this existed when I was working on a Vista Gadget last year that required extensive charting capabilities - this would have solved a lot of frustration using a third-party Javascript library...!

I can think of a number of applications where this could be used to quickly generate off-the-cuff data visualizations with very little overhead (besides network latency) - it would be great to hack into the back-end of this blog, for example, to provide graphic representations of hits, etc. like a mini-FeedBurner console.  It could also be used to provide visualizations of search results, hits, best matches, etc.  Maybe even an alternative visualization of a tag cloud.  It's only a matter of time before coders get creative and think of ways to make the API sing - the Venn Diagram chart, for example, presents some interesting opportunities:

Check it out - it's a bit of fun for your Friday afternoon!


Viewing all articles
Browse latest Browse all 4

Latest Images

Trending Articles





Latest Images