Debugging Infographics

This page describes some debugging tips when your images don't seem to be working.

General Debugging Tips

  • Add the debugging parameter chof=validate to your URL to see list of error messages (or an "all OK" message).
  • Check your syntax against the parameter documentation carefully. Does your image type support your parameter type and parameter options?
  • Read the documentation for your image. Really—read it.
  • Search the google-visualization-api mailing list for similar questions.

My Image Isn't Showing!

Here are some tips for figuring out the problem when your image isn't showing on your web page.

Get the actual image URL from your page. Be sure to get the actual URL that is being used by your page; load up your page and either copy the URL or have the page display it. To get the URL from the browser, typically you must right-click the image and choose an option like "Properties". If the browser isn't even showing a broken image icon, it might be hard to find where to click, so you might want to give it a style to make it more visible, something like <img src="some_url..." style="border:red 5px solid; width:100px; height:100px">. Try pasting the URL into a browser and add the chof=validate parameter to the URL.

Is your URL properly formed? Does it start with https://chart.googleapis.com/chart? followed by all parameters in the format name=value&name=value&name=value ? Add the debugging parameter chof=validate to your URL and visit in your browser to get list of error messages per parameter (or a "Valid" message if it's good).

Does your URL have all the parameters required for your image type? Make sure that you are specifying at least all the required parameters.

Find out which parameters are breaking your image. You can do this either by starting from a broken URL and working backwards, or by starting from a working URL and working forwards:

  • From a broken URL - Plug the URL of your image into a browser. Start removing parameters, one at a time, until you get an image that works. Try adding back the parameters that you removed, individually, until finally you have as many parameters from your original URL as you can get, and still have a working image. The missing parameters are the broken ones. Read the documentation on those parameters carefully; is your syntax correct? Is your usage correct? You might have missed something in the documentation that explains your problem.
  • From a working URL - Cut and paste a working example of your image type into a browser. Add the parameters from your broken image one by one until something breaks, and then work on fixing the problem.

Back to top