Rails on the Run

Rails experiments by Matt Aimonetti

Browsing Posts tagged googlecharts

Github, probably the most famous social code hosting service just redesigned their homepage and are now featuring hosted projects.

I got a very good surprise when Takeo from Powerset & Stafftool hall of fame mentioned to me that Github picked one of my gems as the first featured project!

github

By the way, Takeo is also a Googlecharts contributor (+ a Merbist) and I had the honor to be the first one he ever forked!

Another Googlecharts user, Mokolabs from Graffletopia and iCal Share also decided to try Git and Github. In no time he had forked my project, made some modifications and sent me a pull request. w00t w00t!

To celebrate, we released version 1.3.4 with cleaner documentation, and enhanced features.

Documentation & Code Repo

Thanks to everyone involved in this project. And special kudos to the GitHub team for offering such an awesome service!

update Nov 11: the gem is finally available there or simply:

  sudo gem install googlecharts

Note that I’m working on merging this gem with another Google Charts gem. (see comments for more info about that)

gchart

I’ve been working on a Google Chart Gem that I have ready for a beta release but unfortunately, getting a new project setup on RubyForge takes forever. (apparently 72 hours)

It’s mainly a wrapper for the great GChart API, but instead of using a helper to generate your graphs, you can simply do:

  Gchart.bar(:title => 'My Mojo', :data => [1,2,4,67,100,41,234], :max_value => 300, :bg => 'c3c3c3')

  Gchart.line(:title => 'My Mojo',
              :data => [[1,2,4,67,100,41,234],[41,63,96,17,100,14,423]],
              :bg => '666666',
              :graph_bg => 'cccccc',
              :line_colors => 'ff0000,00ff00',
              :legend => ['morning','evening'])
  Gchart.pie(:data => [20,10,15,5,50], :title => 'SDRuby fu', :size => '400x200', :labels => ['matt', 'rob', 'patrick', 'jordan', 'ryan'])

img

As far as I know this is most complete Ruby wrapper for Google Chart API, but feel free to look around.