A Ruby on Rails helper for making simple graphs. The graphs use only CSS/HTML (and an optional gradient image).
Vertical bar graphs, horizontal bar graphs, and complex bar graphs with an image marker.
Inspiration thanks to Apples to Oranges.
Geoffrey Grosenbach, boss@topfunky.com
Contributions by
Issue this command inside your Rails app:
./script/plugin install http://topfunky.net/svn/plugins/css_graphs
It automatically installs itself into the default Rails helpers, so you don’t have to!
You can also copy the graphics to your images directory with the generator:
# No arguments are needed ./script/generate css_graphs
In your view:
<%= bar_graph [['Gouda', 24],
['Havarti', 9],
['Provolone', 81],
['Wensleydale', 57],
['Stilton', 42]] %>
NOTE: Earlier versions took a splatted array. It now takes a single array of arrays.