Went looking around today for a way to generate charts/graphs in my Rails apps. Wow are there a lot of choices.
Plugins that generate images and/or SVG files:
There are a couple of problems with these. Both use the RMagick library to generate images. RMagick is a Ruby wrapper around ImageMagick. So you're stuck with installing native dependencies (ImageMagick and all its dependencies) outside of Rails/Gems. And because you're providing the chart as a separate file you have to deal with sending the client a URL for the chart that comes back to your controller to generate the chart. There are probably neat Rails ways to handle that cleanly, but neither plugin seems to offer any best practices in their docs. I've also heard rumors that the RMagick/ImageMagick combo leaks memory like a sieve, but can't confirm that.
Plugins that use the Google Chart API:
Google Charts on Rails
These all leave you dependent on connectivity and latency to Google.
Plugins that generate graphs using CSS/HTML:
There's only so much you can do in pure CSS/HTML, so this approach is fairly limited. If your needs are confined to basic bar charts this is a minimal-headache approach.
Plugins that generate Flash charts:
Wrappers for Open Flash Chart:
Open Flash Chart II Plugin for Ruby on Rails
Open Flash Chart Lazy
OFC2 4 Rails
These flash charts are the most visually interesting, as they are often animated and interactive, doing various cute (and maybe useful) things on mouse-over, etc. However, they leave you dependent on the client supporting/enabling Flash. It is also difficult/impossible to print the chart. You might also have the same issues as the image/SVG charts of having to generate a unique URL for the chart, although the author of the first plugin listed has a blog post that shows how to handle that in a very clean, Rails-like fashion.
Wrapper for XML/SWF:
Wrapper for amCharts:
XML/SWF and amCharts are both demoware so I did not pursue these options.