I'm trying out the horizontal bar RGraph demo with this code and it works great:
var data = [1, 40, 30];
var hbar = new RGraph.HBar('myCanvas', data);
hbar.Set('chart.labels', ['Richard', 'Alex', 'Nick']);
hbar.Set('chart.background.barcolor1', 'white');
hbar.Set('chart.background.barcolor2', 'white');
hbar.Set('chart.background.grid', true);
hbar.Set('chart.colors', ['red']);
hbar.Draw();
Is there a way I can use Date
objects instead of numbers? I couldn't get it to work with stuff like
var data = [new Date(1000), new Date(2000), new Date(3000)];