Playing with Google Charts and jQuery

Filed under: Main, Javascript Tips — vincent @ 14:00

Extracting information from table inside the page, and inserting into the very same page a Google Pie Chart? Easily done with jQuery!

Here is an example of this technique, applied to an page with election results (dating from 2009)

Advantages of this technique:

  • No repetition of the data: we only put it in the table, nowhere else
  • … therefore no possibility to have a difference between the numbers and the graph
  • Client side generation, so it doesn’t drain the server
  • … and it’s light to load (low bandwidth)

The possible drawbacks are:

  • Requires Javascript
  • Doesn’t run on Android browser

As for this last point, it’s ironic to see that it doesn’t run on the defaultbrowser for the Android platform, but it does run, at least, on the following browsers:

  • IE 7 (windows)
  • Firefox (Linux)
  • Opera (Linux)
  • iPhone (Safari)

No Comments »

No comments yet.

RSS feed for comments on this post.

Leave a comment

Line and paragraph breaks automatic, e-mail address never displayed, HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>