Charting engine update

by Naneau

I have updated my HTML charting engine introduced this post a bit. I now like it even better. It’s small, very web 2.0 while it renders fast. While it of course only supports a single data set with label/value pairs and can only draw bar charts, it’s usability factor is getting higher now. With the ruler you can highlight those rows with a value bigger or equal to the position of the ruler. Very handy for comparison.

I’ve also made it possible to add rows on the fly. Even if the chart has already been built. You can just do:

1
2
3
4
var label = 'some label!';
var value  = 12345;
chart.addRow(label, value);
chart.build();

And it will add a new row, animating it after it has been added. Hop over to my playground and check it out.

update:
Vianney Devreese told me by e-mail that it doesn’t work in Opera. I’m going to look into that. While Opera isn’t in the list of supported browsers for script.aculo.us it appears that most of the issues are CSS related, not JavaScript.

update 2:
It now works under IE, Firefox and Opera. As it appeared, I forgot to close a table cell, only opera complained about it.