ZoomCharts Documentation

Version: 1.21.3 (2025-04-07)
Switch to Version 2.0 (BETA)

Events

Time 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 TimeChart({
      ...
      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 zooming in on clicked element.

Default behavior can be disabled by calling event.preventDefault() from your event handler function.

Event properties

Events have the following properties

And the following functions

Event delay

Chart update event is not fired immediately but with a configurable delay. This prevents too frequent application updates when user navigates around.

To disable the delay set events.chartUpdateDelay = 0.

X