I dropped development of Plotr, so instead give my new graphing library Flotr a try.
Plotr 0.1.4: Added table parsing
Tagged charting, Javascript, Plotr
A new version of Plotr is out: version 0.1.4. A lot users asked me to implement a method that parses a table and plot a chart from the parsed data. So today I added it and it seems to work quite well. You can download the latest version at google project hosting. Here’s an example of the addTable function:
var options = {
padding: {left: 30, right: 0, top: 10, bottom: 30},
backgroundColor: '#dbdbdb',
colorScheme: 'red'
};
/**
* Plotr.Chart.addTable(table, xcol, yrow, xticks_row)
* The upper left corner of the table is at (x=0, y=0).
*
* The following function call adds the data of element with id 'table'.
* The data parsing starts at x=1 and y=1, so we avoid the headers. The
* fourth argument is the row number of the row containing the labels
* for the xticks.
*/
//initialize a new bar chart
var bar = new Plotr.BarChart('plotr1',options);
//parse the table and add is as a dataset
bar.addTable('table',1,1,0);
//render the barchart
bar.render();
That’s just awesome. But where’s the demo? :’(