Bar graph live data update not working

Share RGraph:   Share or Like RGraph on Facebook!

« Back to message list

Enter your email address to get email updates on this topic. You can stop receiving updates by clicking the link in the update email messages.

Posted by Kevin Morwood on 19th August 2013
I worked through the example where RGraph.Line(...) allowed me to:

line.original_data[0] = new_data_array;

This works well.

Then my next feature required that I do exactly the same thing with the RGraph.Bar. The original chart content works but when I push the new data I get a Javascript error complaining that it can't assign to a nil object.

Any ideas?
Posted by RGraph support on 19th August 2013
Hi there,

The property name is different for the Bar chart:

bar.data = [4,8,6,3,5,2,5];

And there's a list of them here:

www.rgraph.net/docs/api.html#data




Richard, RGraph Support
Posted by Kevin Morwood on 19th August 2013
And so a multi-bar chart would be

bar.data = [[1,2,3],[2,3,4],[5,6,7]];

??
Posted by RGraph support on 20th August 2013
Hi there,

Yes. And you can switch from grouped to stacked with the chart.grouping property.


Richard, RGraph Support
Posted by Kevin Morwood on 28th August 2013
Any plans for a 3D version...where the series elements are stacked on the Z axis?

I have a bar chart with 64 sets of data...and the bars get very small on certain screens.
Posted by RGraph support on 29th August 2013
Hi there,

No plans no. If you're working with limited space you may find this interesting:

www.rgraph.net/docs/howto-custom-static-y-axis.html


Richard, RGraph Support

Add a reply




« Back to message list