Image Charts (Deprecated)

Frequently Asked Questions

  1. What is the Google Chart API?
  2. Why is Google offering this service? What's in it for me?
  3. Is Google logging all my chart data?
  4. I think Google should support a new type of chart, or I have a feature request. Where should I send my request?
  5. What kinds of charts are supported?
  6. Can I create a chart programmatically, e.g. from a JavaScript API?
  7. Is there a limit on the URL length for the Google Chart API? What is the maximum URL length?
  8. Why don't my bars/lines/etc line up with the correct value on the y-axis?

What is the Google Chart API?
The Google Chart API is an extremely simple tool that lets you easily create a chart from some data and embed it in a webpage. You embed the data and formatting parameters in an HTTP request, and Google returns a PNG image of the chart. Many types of chart are supported, and by making the request into an image tag you can simply include the chart in a webpage.
Why is Google offering this service? What's in it for me?
We built the service originally as an internal tool to support rapid embedding of charts within our own applications (like Google Finance for example). We figured it would be a useful tool to open up to web developers.
Is Google logging all my chart data?
The chart data included in the HTTP request is saved in temporary logs for no longer than two weeks for internal testing and debugging purposes.

Of course you should understand that if your chart appears in an image tag on a public webpage it could be crawled.

I think Google should support a new type of chart, or I have a feature request. Where should I send my request?
We have a Google Group set up for this and other support requests: http://groups.google.com/group/google-visualization-api.
What kinds of charts are supported?
You can see a full list in the chart gallery.
Can I create a chart programmatically, for example, in JavaScript?
Currently we only support creating a chart by sending the request in a URL. Several users have created tools and APIs to help assemble the URLs.
Is there a limit on the URL length for the Google Chart API? What is the maximum URL length?
The maximum length of a URL is not determined by the Google Chart API, but rather by web browser and web server considerations. The longest URL that Google accepts in a chart GET request is 2048 characters in length, after URL-encoding (e.g., | becomes %7C). For POST, this limit is 16K.

If URL length is a problem, here are a few suggestions for shortening your URL:

  • If you are using a text encoding data format, remove leading zeros from numbers, remove trailing zeros after decimal points, and round or truncate the numbers after decimal points.
  • If that does not shorten the URL enough, use simple (1 character) or extended (2 character) encoding.
  • Sample data less frequently; i.e., reduce granularity.
  • Remove accoutrements and decorations, such as colors, labels, and styles, from your chart.
Why don't my bars/lines/etc line up with the correct value on the y-axis?
By default, both axes show a range of 0 to 100. This is regardless of the data values. If you want the line, bar, or whatever to align with the actual data value, you must specify a label range that matches the data range exactly using the chxr parameter.

Authentication required

You need to be signed in with Google+ to do that.

Signing you in...

Google Developers needs your permission to do that.