CSS Graphy - Bar Graph Plugin for Rails
Posted on February 13th, 2008 under Open Source, Ruby on Rails.
For our RallyClock product, we are implementing some simple bar graphing in our next round of enhancements. In doing so, we looked around for some existing plugins to get it done but decided on rolling our own. Read more about the plugin we wrote and how it works.
Gruff’ing It
We first came across Gruff by Geoffrey Grosenbach, which is a nice plugin that uses ImageMagick to create PNG-based graphs. For our purposes, it did not seem to be flexible enough when there is a variable number of data pairs. Here are two examples, notice the legend is stripped.


CSS Graphs
Next, we looked at css_graphs, also by Geoffrey, but the limitations as stated on the site didn’t fit our needs:
Limitations of the First Release * Only one graph can be used per page. * Values must be in the range 0-10
CSS Graphy
So we wrote our own plugin with the features of auto-scaling so you can enter in any range of numbers. Also we can put down as many bar charts on our page as we would like.
More Information
You can download the plugin and read about how it works on our project site: http://oss.vermonster.com/css_graphy

