onchartclick event (Chart)



The onchartclick event is activated when a section of a chart widget is clicked. This event can be specified by either a JavaScript expression, or a JavaScript function name.

If the name of a function is specified, the function will receive a single argument. For single-series charts, the argument is a string with the name of the clicked chart section. For multi-series charts the argument is an object with properties "name" and "category" which give the data set / series name and category name.

If a JavaScript expression is used, special variables name and category (for multi-series charts) will be available to the expression.

Example:



onchartclick: alert("You clicked on: " + name);