Rails Plugin: Google Charts On Rails

Google recently made the API for google charts public. It takes parameters using URL query strings and returns png image for the chart.

What we have here is a small wrapper plugin in rails for the google charts.

It is simple to use:


would create something like this:

a sample pie chart

For more usage, visit the Google charts on Rails project.


  1. Vicent said,

    January 17, 2008 @ 4:16 am

    Many thanks for this plugin, it is very useful.
    I have one question, how can I pass the chxt and chg? I have:

    Where t_tabel and t_data are arrays.

  2. blj said,

    January 17, 2008 @ 8:53 am

    Vicent: Ah, you need a 2 axis chart is it? The plugin code is far from finish. I will work on it this weekend to add support for chxt and chg. You are welcome to provide a patch if you are extending it too. Thanks.

  3. Vicent said,

    January 17, 2008 @ 12:12 pm

    Many thanks,
    I’ll be very grateful with you if you can continue working with this plugin. Also, I’m going to study the code for helping you.


  4. Larry Marburger said,

    February 20, 2008 @ 1:45 pm

    Are you guys still maintaining this project? I submitted a patch earlier this morning of the work I did on it yesterday and am continuing to add some functionality today as I need it.

    It’s a simple and fun project to play with and I’d love to join if it’s still active.

  5. blj said,

    February 20, 2008 @ 10:39 pm

    Larry: Yes, I am sorry that I had neglected the project for a while. To be honest, I had not realised that people are actually using the code until today. I was surprised to see the issues have been raised. I will get on with it right away. Please let me know your google account. I will add you to the project. Thanks.

  6. Nick said,

    September 25, 2008 @ 3:33 pm

    Hi there,

    I’ve just installed your plugin and its terrific! I can get your pie chart examples to work perfectly, but I’m having a bit of trouble getting it to work with a xy line though. Would it be possible to provide me with an example line of code with a line graph on it?

    Thanks again, terrific plugin,

RSS feed for comments on this post · TrackBack URI

Leave a Comment