DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Snippets has posted 5883 posts at DZone. View Full User Profile

Use Google Chart API With Ruby On Rails

  • submit to reddit
        There are two useful Wrapper Plugins:
* - Ruby Wrapper from Matt Aimonetti
* - Rails Plugin, incomplete

I prefere the Ruby Wrapper from Matt Aimonetti.

# console
$> ruby script/plugin install git://

Use (example):
# view
<img src="<%=GoogleChart.pie(['1997',10],['1998',20],['1999',40],['2000',30]).to_url%>">