Matthew continues to show the gchartrb library, which provides a Ruby interface for creating the Google Charts URLs. This is followed by an explanation of how to use Capistrano to cache the Google Charts created charts locally.
Read "Intro to Google Charts and gchartrb".
Community comments
Thanks
by Deepak Jois,
Re: Thanks
by Matthew Bass,
Commercial use of Google Charts
by Dean Schulze,
Re: Commercial use of Google Charts
by Matthew Bass,
Another example...
by Lyle Johnson,
Google Chart in Flex
by siva prasanna kumar P,
problems
by Rich S,
Re: problems
by Bill Boyden,
Thanks
by Deepak Jois,
Your message is awaiting moderation. Thank you for participating in the discussion.
Thanks for the plug! I was not very happy with my initial version of gchartrb, so I moved the project to github and made some backwards incompatible changes to it. I also added some new features that Google released recently (like text markers and new chart types like Sparklines and Radar Charts).
The API is now more Rubyish and has much cleaner code. Unfortunately I havent had time to document it and make a release. This should motivate me, hopefully :).
Re: Thanks
by Matthew Bass,
Your message is awaiting moderation. Thank you for participating in the discussion.
Excellent! The plugin is really nice. Thanks for building it.
Commercial use of Google Charts
by Dean Schulze,
Your message is awaiting moderation. Thank you for participating in the discussion.
Section 5.6 of the Terms of Service seem to prevent the use of Google charts in commercial software:
5.6 Unless you have been specifically permitted to do so in a separate agreement with Google, you agree that you will not reproduce, duplicate, copy, sell, trade or resell the Services for any purpose.
I wonder if Google gives permission to use Google Charts to commercial software vendors.
Another show stopper is section 4.3 where Google can interrupt or stop the chart service at any time. You just can't build anything reliable with terms like that.
You mentioned that we can download and serve the charts ourselves. I didn't see anything about that in the Terms of Service. Does Google make a binary available that we can use without threat of interruption?
With the terms in sections 4.3 and 5.6 this looks like it was not intended for use in commercial software.
Another example...
by Lyle Johnson,
Your message is awaiting moderation. Thank you for participating in the discussion.
Thanks for the introduction to this library, Matthew! I cooked up a quick example to show how easy it is to integrate this into an FXRuby application and blogged about it here.
Google Chart in Flex
by siva prasanna kumar P,
Your message is awaiting moderation. Thank you for participating in the discussion.
After reading this impressive article I wanted to use these charts in flex and found a way to use them, I posted that article here.
soa2world.blogspot.com/2008/06/google-chart-in-...
Thanks,
Siva Prasanna Kumar .P
soa2world.blogspot.com
Re: Commercial use of Google Charts
by Matthew Bass,
Your message is awaiting moderation. Thank you for participating in the discussion.
Dean, I take their wording as meaning that we can't directly sell the charts we generate, not that they can't be used indirectly in a commercial app. But you're right, it's not particularly clear. That's unfortunate.
Regarding Google interrupting the service, they pretty much have to put that in to protect themselves. Their overarching terms of service that cover their other apps has similar wording, but realistically, are they very likely to cut off service to Gmail, etc. without warning? Probably not.
When I mentioned serving the charts ourselves, I was referring to downloading the PNGs and putting them on a personal server. There isn't a binary available (that I know of).
problems
by Rich S,
Your message is awaiting moderation. Thank you for participating in the discussion.
Hey Deepak, nice work -- I've implemented it in my current project. Seems like one needs to "unpack" the gem in the the vendor/gems folder and then add the config.load_path to the environment.rb. If I have that correct, it would be great to add that to the documentation. Also, I found setting the title to nil in the pie chart to fail. Cheers, Rich
Re: problems
by Bill Boyden,
Your message is awaiting moderation. Thank you for participating in the discussion.
I believe the solution to requiring the gem in a rails app is simpler than what you suggest. What you add to environment.rb is
config.gem 'gchartrb', :lib => 'google_chart'
If you think about this it makes sense. You installed a gem by the name of 'gchartrb' but in order to use it in your ruby code you require 'google_chart'.