English | Site Directory

Google Visualization API

Frequently Asked Questions

    Getting Started

  1. What is the Google Visualization API?
  2. What can I do with the Visualization API?
  3. Where can I find documentation for the Visualization API?
  4. I have a question related to embedding a Visualization gadget on Google Spreadsheets. Where do I go for help?
  5. How do I embed a Visualization gadget on my website?
  6. How do I create a new Visualization?
  7. How do I create a Visualization gadget?
  8. Where can I find example code of Visualization apps and/or gadgets using the Visualization API?
  9. Can a Flash application access the Visualization API?
  10. I have a different question/problem, who do I contact to get more information?
  11. Using the API

  12. What data sources can I access using the Visualization API?
  13. I created a Visualization application using the Visualization API, can I make that app into a Gadget?
  14. My application expects the data it receives to be in a specific format. How do I handle exceptions?
  15. How do I override the default exception and error handling in Gadgets?
  16. What is the Google Visualization Program Policy?
  17. Is it safe to embed a visualization in my web site?
  18. Is the Google Visualization API available for commercial use?
  19. How do I know if I am violating the Google Visualization API Terms of Service?
  20. Becoming Active in the Community

  21. How can I share my Visualization application or gadget with others?
  22. What is the Visualization Gallery?
  23. What is the Visualization Gadget Gallery?
  24. How do I get my Visualization application on the Visualization or Gadget Gallery?
  25. What is the Gadget content directory?
  26. How do I submit my Visualization gadget to the Gadget content directory?
  27. Why would I want to submit a gadget to both the API's Gadget Gallery and the Gadget content directory?
  28. How do I make my Visualization gadget more discoverable?

Getting Started

What is the Google Visualization API?
The Google Visualization API allows you to create visualizations and reporting applications over structured data and helps integrate these directly into your website or on a Gadget.
What can I do with the Visualization API?
With the Google Visualization API, you can access structured data created locally in your browser or from supported data sources and receive a response in a simple tabular format. The format is amenable to use by reporting, analysis or visualization applications. You can thus visualize the data and/or add new functionality to applications, such as Google Spreadsheets.
Where can I find documentation for the Visualization API?
You can find the developer guide and all other related documentation at http://code.google.com/apis/visualization/documentation.
I have a question related to embedding a Visualization gadget on Google Spreadsheets. Where do I go for help?
For specific questions related to Google Spreadsheets we suggest you first check the Spreadsheet Integration section. You can also refer to the help pages for Google Spreadsheets. If you are not able to find an answer in either of these places, the best way is to post your question on the Visualization discussion group. Google employees also participate in the group and pop in from time to time to answer developer questions.
How do I embed a Visualization gadget on my website?

If you have your gadget on a Google Spreadsheet, open the gadget menu, and select 'Publish gadget'. Paste the provided URL into your web page.

If you have your gadget on iGoogle, open the gadget preferences, select 'Share this gadget', select 'copy and paste a link to this gadget' and check the 'Send my settings for this gadget'. Paste the provided URL into your web page.

How do I create a new Visualization?
The best way to get started is to read the Developers Guide, and the Creating Visualizations section.
How do I create a new Visualization gadget?
The best way to get started is to first get familiar with the Developers Guide, and then read the Gadget Extensions section and start coding.
Where can I find example code of Visualization apps and/or gadgets using the Visualization API?
You can find example code at the Visualization API example code documentation.
Can a Flash application access the Visualization API?
Absolutely. The Visualization API uses a JavaScript API, but there are libraries that enable Flash apps to connect with JS code. One such library you may find useful can be found at http://code.google.com/p/swfobject.
I have a different question/problem, who do I contact to get more information?
Please post your question in the Google Visualization API discussion group to get help from the Visualization developer community. The Visualization team also participates in this group to answer questions.

Using the API

What data sources can I access using the Visualization API?
With the Visualization API you can access data locally from your browser by creating the API's standard DataTable format, or access any data source that supports the API. In order to allow developers to start using the API immediately, we have released the API with support on Google Spreadsheets. We plan to add more data sources in the near future.
I created a Visualization application using the Visualization API, can I make that app into a Gadget?
Absolutely. To wrap your application as a gadget refer to the Gadget Extensions section of the developer guide.
My application expects the data it receives to be in a specific format. How do I handle exceptions?
You can use the getNumberOfColumns() and getColumnType() methods of class google.visualization.DataTable to test that the data you get matches what you expect, and issue an error message for mismatches.
How do I override the default exception and error handling in Gadgets?

If you call validateResponse() of class google.visualization.GadgetHelper, the default error message handling will check for errors and send a message to the user in case of an error.

If you do not want to use the default error handling, you can check for errors yourself by calling the isError() method of the google.visualization.QueryResponse class and issuing your own message for the error. Use methods getMessage() and getDetailedMessage() to obtain more information about the error.

Is it safe to embed a visualization in my web site?

Running third party code directly on your web site poses inherent risks. Gadgets run in a separate iframe, and are generally safer than JavaScript embedded in your web page. Google makes no promises or representations about the gadgets' and applications' performance, quality, security, or content. Visualization applications and gadgets that do not comply with the Google Visualization API Terms of Service may be removed from the galleries.

What is the Google Visualization Program Policy?

As described in the Terms of Service, we may decline to include and display content that violates our program policy by displaying or linking to:

  • Illegal content.
  • Invasions of personal privacy.
  • Pornography or obscenity.
  • Content, such as malicious code, that interferes with or is harmful to a user's computer or the functioning of the host web page.
  • Promotions of hate or incitement of violence.
  • Violations of copyright. Please see our DMCA policy for more information.
  • Violations of trademark.
  • Impersonations of third parties.

Additionally, we require developers to maintain their gadget or application as long as it resides in the directory.

These policies may be revised from time to time without notice.

Is the Google Visualization API available for commercial use?
Yes. For the fine print please refer to the Google Visualization API Terms of Service.
How do I know if I am violating the Google Visualization API Terms of Service?
Please refer to the full Terms of Service at http://code.google.com/apis/visualization/terms.html

Becoming Active in the Community

How can I share my Visualization application or gadget with others?
Start by placing your visualization on the Visualization Gallery and your gadgets on the Gadget content directory and the API's Gadget Gallery. You can link back to your site and provide your source code if you wish. Get involved in our discussion group and get the community's feedback.
The Visualization Gallery is a listing of applications that use the Visualization API. It provides a central location for the Visualization developer community to share Visualization applications.
What is the Visualization Gadget Gallery?
The Visualization Gadget Gallery is a listing of gadgets that use the Visualization API. It provides a central location for the Visualization developer community to share Visualization gadgets.
How do I get my Visualization application on the Visualization or Gadget Gallery?
Submit your visualization to the Visualization Gallery and your gadget to the Visualization Gadget Gallery
What is the Gadget content directory?
The Gadget content directory is a listing of Gadgets that can be added to iGoogle or other web pages. It provides a central location for users to find new gadgets to add to their pages. Most of the gadgets in the content directory were written by other companies and by Google's users.
How do I submit my Visualization gadget to the Gadget content directory?
Any submission to the Visualization Gadget Gallery will also auto-submit your gadget to the Gadget content directory.
Why would I want to submit a gadget to both the API's Gadget Gallery and the Gadget content directory?
The Gadget content directory provides the widest consumer audience for your gadget, while the Visualization Gadget Gallery provides a targeted audience of visualization developers. With both galleries you cover your two target audience groups and get both wide and in-depth market reach. Any submission to the Visualization Gadget Gallery will also auto-submit your gadget to the Gadget content directory.
How do I make my Visualization gadget more discoverable?

There are various ways you can promote your gadget and help other users discover it. Getting more people to use your gadgets is rewarding and helps increase your gadget's ranking in the Gadget content directory. Here's a few recommended ways to get started: