Skip to content


Google charts: Good, bad and ugly

In my previous post, I wanted to quickly chart some simple data for display in the post. I don’t use Excel at home, so my choices were limited to what’s available in Google Docs. I’d used the chart features in Google Docs many times, but only for my own reference, so I’d never really cared what they look like before. When looks matter, Google Docs charts can be frustrating.

Google Docs Chart

I started with the default Google Docs pie chart. (In a Google Docs spreadsheet, Insert > Chart.) It has relatively few options and no control over the colors, font or type size. In a spreadsheet, the chart is adequate, but the text is rendered with a different font that I don’t like. Conclusion: Passable but not desirable.

Google Docs Gadgets

Next, I looked at the three Google Docs pie chart gadgets (In a Google Docs spreadsheet, Insert > Gadget.) which were initially promising. One of the pie chart gadgets looks functionally identical to the previous one, but when it’s rendered as an image it has a frame and a Google Docs logo. It renders with the correct font, which is good, but I didn’t want the frame. Conclusion: Keep trying.

There’s a second pie chart gadget by Google that has similar controls but renders with different colors and in a different type size, along with a border like the previous one. To my eye, the colors don’t go well together and the border feels too tight — so tight that there’s no white space between the legend and the border. Finally, the title doesn’t render as part of the image. Conclusion: Hell, no.

Finally, there’s the FusionCharts Pie & Donut Widget by InfoSoft Global Ltd., which has many more controls than the other two, including font and type size, but it is perhaps the ugliest of the three, with a beveled circumference of the pie and a shaded background, poorly centered in a frame. There is a palette control, but that appears to affect the background and text color only, which is disappointing. Most annoyingly, displaying the editing panel for this gadget expands the rendering area, potentially resulting in an ultra-tall frame if you’re not careful. Conclusion: This is the ugliest yet.

Google Chart API

Finally, I decided to give the Google Chart API a shot. Unlike the Google Docs charts and gadgets, the API has no user interface, so you have to learn the syntax in order to use it, but I thought it was worth the effort to create something that was exactly what I wanted. Well, close enough to what I wanted. I’m still not thrilled with the results, but it was good enough to suit my purposes.

It’s not for the faint of heart, though, since you have to learn the syntax to pass the right parameters to the server in the URL, so this:

http://chart.apis.google.com/chart?cht=p&chs=500×240&chtt=Posts+by+Category+-+Chart+API&chd=t:30,23,22,14,12,5&chl=Reputation|Identity|Influence|Meta|Tips|Miscellaneous

Becomes:
Posts by Category - Chart API

I was generally pleased with the results, though the type is a little small for my taste. The colors match the look here, but that’s purely coincidental.

The syntax is well documented, but I don’t understand why there are different delimiters for each parameter. Otherwise, it’s easy enough to figure out, if you’re patient and don’t mind reading documentation. Here’s how a simple chart URL breaks down.

Server   http://chart.apis.google.com/chart
Type   ?cht=p
Size   &chs=500×240
Title Text   &chtt=Posts+by+Category+-+Chart+API
Data   &chd=t:30,23,22,14,12,5
Labels   &chl=Reputation|Identity|Influence|Meta|Tips|Miscellaneous

 

Conclusion

In the end, I was disappointed with all of the choices. I liked the flexibility of the Google Chart API, but it takes a lot of effort to get the results you want. I was underwhelmed with all of the easier chart options built into Google Docs, and I was even more disappointed when I learned that you can’t embed a chart from a spreadsheet into a word processing document. I appreciate the simplicity of Google Docs, but the chart tools have a long way to go.

Posted in tips.

Tagged with , , .


One Response

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.

Continuing the Discussion

  1. Html Font Tips | Web Design and all stuff related to it! linked to this post on November 22, 2009

    [...] Google charts: Good, bad and ugly | Glen Turpin: The Identity Question [...]



Some HTML is OK

or, reply to this post via trackback.