ZoomCharts Documentation

Events

Pie Chart provides a set of events for your application to use.

Specifying event handlers

The event handlers can be specified using settings or added dynamically.

Using settings:

    new PieChart({
      ...
      events:{
        onClick: function(event){...},
        onChartUpdate: function(event){...}
      },
      ...
    });

Dynamically use chart.on(event, handler) and chart.off(event,handler) functions. In this case skip the "on" part in event name: onClick becomes click.

Default behavior

Click event has default behavior of opening the clicked slice. To disable it, call event.preventDefault() from your event handler function.

Event properties

Events have the following properties:

And the following functions

X