I’m trying to use Raphael.js to do some nice graphing for data after which I realize there are several limitations to the js which I’m trying to solve.
Does anyone knows how to scale the y axis value dynamically as I’ve realized that once the values cross >500 , the graphing does not appear at all , only the axes appears with plots at the extreme edges in one line (i.e. over the limit).
Secondly is there a way to add legends or axis labels to the graphs ? Or must graph labels be coded separately as html ?
Thanks Lots !!! Its a great looking tool but it seems quite useless …
The chart g.bar.js does not have an option to draw axes. If you look inside g.line.js, however, there is a block of code around lines 98-117 (currently) that draws axes:
This can effectively be copy and pasted into the function VBarchart in g.bar.js to give you axes options. A little adjustment to x and y positions will be required, and maxy should probably be set to opts.total to get the scaling right – yes, you will need to fart around with it a bit, but it does work.