How can I get my Bar chart object and its labels on its click event?

« 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 Praveen on 21st February 2013
Hi I have 3 bar charts on my page and have added click events on first chart.
I am able to get bar's index, which I have clicked using-
var index = shape['index'];

but I need to know about the label on the same index.
tried "" it has reference to last chart, but I need first chart object.

How I can get the labels or chart object on click event?
Posted by RGraph support on 21st February 2013
Hi there,

You need to use the ObjectRegistry methods. The ObjectRegistry is a record of al of the RGraph objects that have been created. The .getObjectByType() may be most useful - though this method has changed recently so if you upgrade you may need to update your code.

Richard, RGraph Support

Add a reply

« Back to message list