Thursday, December 6, 2007

Embed charts in webpages with one of our simplest APIs yet



Today we're launching the Google Chart API, a really simple tool for creating charts and graphs that are perfect for websites.

Let's get straight in with an example. This URL:

http://chart.apis.google.com/chart?cht=p3&chd=s:hW&chs=250x100&chl=Hello|World

Creates this image:



That's it - no state, no calls, just send your data in an http request and get a png image graph back. Embed the request in an img tag and you're done. We currently support line charts, bar charts, pie charts, scatter plots, and sparklines.

We actually built this originally to use internally - we use it on Google Video and Google Finance for example. It seemed like it would be a good thing to open up to other users too. You can find out all about it at on the Google Chart API homepage and there's a Google Chart API group for questions and support.

The Google Chart API started out as a 20% time project here in Zurich, and we're really happy to be launching it to the world today. Let the charting begin!

34 comments:

Alexandre said...

This is quite a nice to have!
Good job guys keep it coming !

recover said...

I've been trying to figure out the http variables that you use on Google Video for some time for my script!
This API should prove really useful! :D

Ben said...

This looks like a wonderful API, and you should be really proud at the work you have put in it.

However, I'm concerned that users of this API might be too quick to make overly simplistic charts.

Check out Edward Tufte for his thoughts on graphical displays of quantitative data.

NOTE: this is *not* a knock on the tool. Just a reference to more information for future users.

scrambledheads said...

Looks good but is there any reason why you wouldn't include some Alt attributes to that? since the data is there?

Bonstio said...

Simple is good. I like. Lots.

Toomore said...

有辦法支援中文嗎?
support chinese?

Darius Kazemi said...

Brilliant! I was just looking this morning for an easy way to do sparklines on my website. I think this is it.

Stanislav O. Pogrebnyak said...

Cool. It’s really useful tool. I'll use it in my web based projects. Thanks to Google again.

Aaron Dragushan said...

Wow, great job.

Alex Chitu said...

Can you detail the limitations? "50,000 queries / user / day" means 50,000 queries / IP / day or 50,000 queries / site / day or something else?

Eduardo Jezierski said...

Great job folks!
Are there any chances the categories (for example in your pie chart) may be hotlinked to something else (for example to 'drill down' into the data)

Also, since AFAIK you folks now own gapminders, is there a chance for future work to go a little bit in that direction?
(to Ben - if you haven't seen this check out the TED videos - great examples of multidimensional data made comprehensible and actionable)

Wenbert Del Rosario said...

this is great. this is the simplest tool to generate sites! just plug-in to the image tag!

sorry said...

真的是太酷了!!

kimson said...

Great job, I already spent way too much time playing around ;)
I might be missing the point, but is there any way of mixing types of graphs in one view?

Krista-Lee Bissoon said...

simply wondeful useful tool! nice job Google!

Google-girl kbissoon.
Krista-Lee Bissoon

Indika said...

Wow! This is simply super. I'm sure google will enable us to use hotspots in charts so we could hot link. I have coded a Simple Web Gui to create the URL for google charts. You are wellcome to use it if needed.

Indika's Blog

Dataland said...

Google has released an open web API that provides a drop-dead simple means of adding graphs and charts to web pages. I really do find their implementation to be extremely elegant and powerful. Here are some sample charts and their usage urls. Good stuff... (Pingback)

http://dataland.wordpress.com/2007/12/07/google-charting/

ProJester said...

Hi,with all the vital role of open source software, where can I find the source code of the following google APIs?

--- Google Chart API
--- Google Analytics

Thank you in advance,

Alfred.

Chad said...

I'm going to name my first-born "Google" or "Googlette".

Thanks,

Chad

Wax said...

Sounds great!It would be even better if Google could provide us with a simple project management tool and compliment it with AIP charts. Right now I'm using Wrike for my projects and it would be really great if Google could offer us something like that.

Gabriel Medina "gab" said...

like! Congratulations!

gab

gosha said...

nice one!
coded an interface to it, here
interface for google charts

Bipool said...

simply Great!!
It will be very much useful to me

KS said...

Cool tool - will save a lot of people a lot of work.

Any thoughts on how to handle very long axis labels? The examples are for Jan, Feb, Mar etc but if there are much longer labels they end up running into each other.

Richard Brennan said...

Saw this on Simon Dickinson's blog- very useful, thanks loads.

Shawn said...

So how about a way to embed an actual stock chart from Google Finance in a web page?

blogger said...

This API is great,
Google APIs are amazing,
I had implement a UI editor for Google Charts, you can access it at
http://chartgen.blogspot.com

Mike said...

Very cool way of presenting live data. We've included some Google charts on our homepate at www.goboko.com

rick said...

hey Guy's, No time for charting then chk this out create your own charts on visifire and take my word it will be done in a couple of minuets.unbelievable right . then go chk out offered under open source powered by silverlight 2 beta 2 just for free

Tammix said...

Developers must check this.. http://tammixed.blogspot.com, what the didn't consider...

ganesh said...

Hi, Is there anyway to show the stock chart like the one in finance.google.com?
Basically, how to embed the google finance chart?

jorel314 said...

It's been about a year since the Google Chart API was launched. I was surprised it didn't have a Wikipedia article, so I started one for it here...

http://en.wikipedia.org/wiki/Google_Chart_API

Feel free to add to it.

Schiwick said...

Google chart is great and simple. For advanced visualization charts, also check out style chart. The examples are fascinating.

online said...

If you insist.Tiffany JewelryBullshit.links of londonWhat are you looking at? Never seen this before.Rubs me the wrong way.Tiffany JewelryYou think I like it like this!I'm (just) pulling your chain.You can never tell about this sort of thing.He won the lottery! Lucky bastard.How about this instead!You can do it.Leave it up to fate(destiny).You go first. I'll catch up later.

Post a Comment