ChartDirector 6.0 (Perl Edition)

JsChartViewer.attachHandler


Usage

attachHandler(eventId, handler)

Description

Attaches a function as the handler of the specified event(s).

This method expects the function to be a real function object, not a text string. The function will be called as if it is a method of the JsChartViewer object, which means the "this" pointer inside the function represents the JsChartViewer object that calls the function.

Arguments

ArgumentDefaultDescription
eventId(Mandatory)A text string specifying the event, or an array of text strings specify the events.
handler(Mandatory)A function object to be executed when the event occur.

Return Value

An handler id representing the attachment of the handler to the event, or an array of handler ids representing the attachment of the handler to the events. The id or array of ids can be used in JsChartViewer.detachHandler to detach the handler.