DhtmlxChart allows to handle different kinds of events in your application. It can be mouse click or click on item. The field of actions is rather wide.
You can attach several handlers to the same event, and all of them will be executed.
If you need to attach event to an application, use attachEvent() method.
BarChart.attachEvent("onItemClick", function(id){ BarChart.remove(id); return true; })
In the code snippet showed above, event handler allows you to delete from the Bar Chart the bar you click on by using the remove() method.
You can also delete event if you need. The detachEvent() method helps you here.
var myEvent = BarChart.attachEvent("onItemClick", function(id){ BarChart.remove(id); return true; }); BarChart.detachEvent(myEvent);
The following events are available in dhtmlxChart:
An example that uses mentioned above methods you can see here.