Generate beautiful canvas graphs from your ActiveRecord models in one line in your view. Works in most major browsers. All the heavy lifting is done by flot on the client in Javascript.
Yup. The flot project has examples.
Yes! Ok, it's a long line:
= chart("graph", { "Store 1" => { :collection => @store_one, :x => :date, :y => :sales }, "Store 2" => { :collection => @store_two, :x => :date, :y => :sales }})
But all you really need to give it are collections of ActiveRecord models, labels for
those collections, and what fields map to the X and Y axis of your graph.
Everything the flot plugin gives you: legends, colors, ranges, max and min, bars and lines, etc.
You need the jrails plugin, which replaces the default Prototype/Scriptaculous library with jQuery and jQuery UI. So in two steps:
ruby script/plugin install http://ennerchi.googlecode.com/svn/trunk/plugins/jrails
ruby script/plugin install http://flotilla.rubyforge.org/svn/trunk/plugins/flotilla
Public git available at
git://github.com/joshuamiller/flotilla.git
Peep the CHANGELOG