Events

ZingChart provides a rich API for controlling chart characteristics from re-rendering a plot (reload), loading new data (setseriesdata), modifying existing charts (modifyplot), zooming in on a data range (zoomto), toggling various interactive features (togglelegend), and much more.

Global Chart Listeners

There are 4 methods used to configure chart event-listeners.

.bind()

This method will bind an event to a specific chart after it has rendered.

zingchart.bind('chartId', 'load', function() {
  // Do something for single chart
});

By defining a null value for chartId this will be the event to all charts on the page.

zingchart.bind(null, 'load', function(e) {
  // Do something for ALL charts on page
  switch(e.id) {
    case 'chartId1':
      // Do something
      break;
    case 'chartId2':
      // Do something else
      break;
    case 'chartId3':
      // Reticulate splines
      break;
  }
});
AttributeTypeInfo
eventNameString

The name of the event.

"load" | "complete" | ...

handlerFunction

Handler fired when the event takes place.

function(params) {...}

idString

The ID of the chart or null if event is bound to all the charts in a page.

"mydiv" | null | ...

.render()

This method binds a list of events to an object at the time of the render. This is especially helpful when working in frameworks so you can keep all your code in one concise place.

zingchart.render({
  id: 'chartId',
  data: chartData,
  events: {
    load: function(p) {
      // Do something
    }
  }
});

.load()

This method will listen for the specified event across all charts in a page. To execute different functions across each chart, set up a switch that uses the chart’s returned id as the expression for the switch:

zingchart.load = function(e) {
  switch (e.id) {
    case 'chartId1':
      // Do something
      break;
    case 'chartId2':
      // Do something else
      break;
    case 'chartId3':
      // Reticulate splines
      break;
  }
}

.unbind()

This method will bind an event to a specific chart after it has rendered.

zingchart.unbind('chartId', 'load', function() {
  // Do something for single chart
});

By defining a null value for chartId this will be the event to all charts on the page.

zingchart.unbind(null, 'load', function(e) {
  // Do something for ALL charts on page
  switch(e.id) {
    case 'chartId1':
      // Do something
      break;
    case 'chartId2':
      // Do something else
      break;
    case 'chartId3':
      // Reticulate splines
      break;
  }
});
AttributeTypeInfo
eventNameString

The name of the event.

"load" | "complete" | ...

handlerFunction

Handler fired when the event takes place.

function(params) {...}

idString

The ID of the chart or null if event is bound to all the charts in a page.

"mydiv" | null | ...

Animation Events

animation_end

Dispatches when the animation ends.

AttributeTypeInfo
graphidString

The ID of the graph object.

"mygraph" | 0 | 1 | ...

idString

The ID of the zingchart object.

"mychart" | ...

animation_start

Dispatches when the animation starts.

https://app.zingsoft.com/demos/embed/Q7X0UN4I
https://app.zingsoft.com/demos/embed/Q7X0UN4I
AttributeTypeInfo
graphidString

The ID of the graph object.

"mygraph" | 0 | 1 | ...

idString

The ID of the zingchart object.

"mychart" | ...

animation_step

Dispatches on every step of the animation, for every plot/node.

https://app.zingsoft.com/demos/embed/231W9KUI
https://app.zingsoft.com/demos/embed/231W9KUI
AttributeTypeInfo
graphidString

The ID of the graph object.

"mygraph" | 0 | 1 | ...

idString

The ID of the zingchart object.

"mychart" | ...

nodeindexNumeric

The index of the node.

0 | 8 | 20 | ...

plotindexNumeric

The index of the plot.

0 | 1 | ...

stageNumeric

The "position" in the animation timeline. It starts from 0 and ends as 1 but for several animation methods, intermediate values can exceed 1.

0 | 0.45 | 1.04 | ...

valueNumericThe node value.

Data Manipulation Events

modify

Modify Dispatches when ZingChart is modified via the modify API call.

https://app.zingsoft.com/demos/embed/FEGGNCC7
https://app.zingsoft.com/demos/embed/FEGGNCC7
AttributeTypeInfo
dataObject

The new configuration data.

{...}

graphidString

The ID of the graph object.

"mygraph" | 0 | 1 | ...

idString

The ID of the zingchart object.

"mychart" | ...

objectStringThe object to modify if set in the API call.

node_add

Dispatches when the user adds a node.

https://app.zingsoft.com/demos/embed/R5LZL0GG
https://app.zingsoft.com/demos/embed/R5LZL0GG
AttributeTypeInfo
graphidString

The ID of the graph object.

"mygraph" | 0 | 1 | ...

idString

The ID of the zingchart object.

"mychart" | ...

keyMixedThe node's key.
nodeindexNumeric

The index of the node.

0 | 8 | 20 | ...

plotindexNumeric

The index of the plot.

0 | 1 | ...

textStringThe string representation of the node value.
valueNumericThe node value.

node_remove

Dispatches when the user removes a node.

https://app.zingsoft.com/demos/embed/13FN93S2
https://app.zingsoft.com/demos/embed/13FN93S2
AttributeTypeInfo
graphidString

The ID of the graph object.

"mygraph" | 0 | 1 | ...

idString

The ID of the zingchart object.

"mychart" | ...

keyMixedThe node's key.
nodeindexNumeric

The index of the node.

0 | 8 | 20 | ...

plotindexNumeric

The index of the plot.

0 | 1 | ...

textStringThe string representation of the node value.
valueNumericThe node value.

plot_add

Dispatches when a plot is added to the graph.

https://app.zingsoft.com/demos/embed/3WZ7WEPQ
https://app.zingsoft.com/demos/embed/3WZ7WEPQ
AttributeTypeInfo
dataObject

The new configuration data.

{...}

graphidString

The ID of the graph object.

"mygraph" | 0 | 1 | ...

idString

The ID of the zingchart object.

"mychart" | ...

plotindexNumeric

The index of the plot.

0 | 1 | ...

plot_modify

Dispatches when a plot is modified.

https://app.zingsoft.com/demos/embed/1ZUWFBM2
https://app.zingsoft.com/demos/embed/1ZUWFBM2
AttributeTypeInfo
dataObject

The new configuration data.

{...}

graphidString

The ID of the graph object.

"mygraph" | 0 | 1 | ...

idString

The ID of the zingchart object.

"mychart" | ...

plotindexNumeric

The index of the plot.

0 | 1 | ...

plot_remove

Dispatches when a plot is removed.

https://app.zingsoft.com/demos/embed/Z0AUOZYR
https://app.zingsoft.com/demos/embed/Z0AUOZYR
AttributeTypeInfo
graphidString

The ID of the graph object.

"mygraph" | 0 | 1 | ...

idString

The ID of the zingchart object.

"mychart" | ...

plotindexNumeric

The index of the plot.

0 | 1 | ...

reload

Dispatches when the chart is reloaded.

https://app.zingsoft.com/demos/embed/UIRHBIRE
https://app.zingsoft.com/demos/embed/UIRHBIRE
AttributeTypeInfo
graphidString

The ID of the graph object.

"mygraph" | 0 | 1 | ...

idString

The ID of the zingchart object.

"mychart" | ...

setdata

Dispatches when the setdata API function is called.

https://app.zingsoft.com/demos/embed/HH6Y91RQ
https://app.zingsoft.com/demos/embed/HH6Y91RQ
AttributeTypeInfo
dataObject

The new configuration data.

{...}

graphidString

The ID of the graph object.

"mygraph" | 0 | 1 | ...

idString

The ID of the zingchart object.

"mychart" | ...

Export Events

data_export

Dispatches when the user exports the graph data.

AttributeTypeInfo
idString

The ID of the zingchart object.

"mychart" | ...

image_save

Dispatches when the user saves an images of the graph.

AttributeTypeInfo
idString

The ID of the zingchart object.

"mychart" | ...

print

Dispatches when the user prints the graph.

AttributeTypeInfo
idString

The ID of the zingchart object.

"mychart" | ...

Feed Events

feed_clear

Dispatches when the feed is cleared.

AttributeTypeInfo
idString

The ID of the zingchart object.

"mychart" | ...

feed_interval_modify

Dispatches when the feed interval is modified.

AttributeTypeInfo
idString

The ID of the zingchart object.

"mychart" | ...

intervalNumeric

The new interval.

5 | 10 | ...

feed_start

Dispatches when the feed starts.

AttributeTypeInfo
idString

The ID of the zingchart object.

"mychart" | ...

feed_stop

Dispatches when the feed stops.

AttributeTypeInfo
idString

The ID of the zingchart object.

"mychart" | ...

Global Events

beforedestroy

Dispatches before the ZingChart chart object is destroyed.

https://app.zingsoft.com/demos/embed/TAY6GZE6
https://app.zingsoft.com/demos/embed/TAY6GZE6
AttributeTypeInfo
idString

The ID of the zingchart object.

"mychart" | ...

loaderObject

The loader object, containing other possibly valuable data.

{...}

click

Dispatches when the user clicks anywhere on the graph.

https://app.zingsoft.com/demos/embed/LMCHY10V
https://app.zingsoft.com/demos/embed/LMCHY10V
AttributeTypeInfo
graphidString

The ID of the graph object.

"mygraph" | 0 | 1 | ...

idString

The ID of the zingchart object.

"mychart" | ...

plotareaBoolean

Specifies if the click was fired inside the plotarea object.

true | false | 1 | 0

targetString

The type of the graph object being clicked.

"none" | "node" | "legend-item" | "menu-item" | "preview" | "shape" | "label"

targetidString

The id of the DOM element being clicked.

"elementid" | ...

touchBoolean

Specifies if the event fired on a touch device.

true | false | 1 | 0

xNumeric

The x position of the click relative to the chart position.

230 | 140 | ...

yNumeric

The y position of the click relative to the chart position.

230 | 140 | ...

complete

Dispatches every time a graphset is completely rendered, so, even on API calls that require chart repaint.

https://app.zingsoft.com/demos/embed/26DZXF4G
https://app.zingsoft.com/demos/embed/26DZXF4G
AttributeTypeInfo
heightNumeric

The height of the zingchart object.

400 | 300 | ...

idString

The ID of the zingchart object.

"mychart" | ...

outputString

The render output of the zingchart object.

"svg" | "canvas" | "vml"

widthNumeric

The width of the zingchart object.

400 | 300 | ...

dataparse

Dispatches when the data is available for the chart, prior to parsing routines. Useful for changing/adding elements into the data.

https://app.zingsoft.com/demos/embed/UQ0XS15T
https://app.zingsoft.com/demos/embed/UQ0XS15T
AttributeTypeInfo
heightNumeric

The height of the zingchart object.

400 | 300 | ...

idString

The ID of the zingchart object.

"mychart" | ...

outputString

The render output of the zingchart object.

"svg" | "canvas" | "vml"

widthNumeric

The width of the zingchart object.

400 | 300 | ...

dataready

Dispatches when the data is ready to be parsed.

https://app.zingsoft.com/demos/embed/SRB0YXUB
https://app.zingsoft.com/demos/embed/SRB0YXUB
AttributeTypeInfo
heightNumeric

The height of the zingchart object.

400 | 300 | ...

idString

The ID of the zingchart object.

"mychart" | ...

outputString

The render output of the zingchart object.

"svg" | "canvas" | "vml"

widthNumeric

The width of the zingchart object.

400 | 300 | ...

destroy

Dispatches after object is destroyed.

https://app.zingsoft.com/demos/embed/TAY6GZE6
https://app.zingsoft.com/demos/embed/TAY6GZE6
AttributeTypeInfo
idString

The ID of the zingchart object.

"mychart" | ...

guide_mousemove

Dispatches when the guide position changes.

https://app.zingsoft.com/demos/embed/HWCEJ7DI
https://app.zingsoft.com/demos/embed/HWCEJ7DI
AttributeTypeInfo
graphidString

The ID of the graph object.

"mygraph" | 0 | 1 | ...

idString

The ID of the zingchart object.

"mychart" | ...

itemsArray

Array of objects representing plot and node information for the guide position with the following keys: plotindex, nodeindex, value, text.

[...]

load

Dispatches only the first time the graphset is completely rendered. Subsequent chart reloads will not fire this event.

https://app.zingsoft.com/demos/embed/VBZMN18F
https://app.zingsoft.com/demos/embed/VBZMN18F
AttributeTypeInfo
heightNumeric

The height of the zingchart object.

400 | 300 | ...

idString

The ID of the zingchart object.

"mychart" | ...

outputString

The render output of the zingchart object.

"svg" | "canvas" | "vml"

widthNumeric

The width of the zingchart object.

400 | 300 | ...

menu_item_click

Dispatches when a menu item is clicked from within the context-menu.

https://app.zingsoft.com/demos/embed/L7QDA9MT
https://app.zingsoft.com/demos/embed/L7QDA9MT
AttributeTypeInfo
evObject

The event object, containing other possibly valuable data.

{...}

graphidString

The ID of the graph object.

"mygraph" | 0 | 1 | ...

heightNumeric

The height of the zingchart object.

400 | 300 | ...

idString

The ID of the zingchart object.

"mychart" | ...

menuitemidString

The id of the menu item being clicked.

"viewaspng" | ...

targetidString

The id of the DOM element being clicked.

"elementid" | ...

widthNumeric

The width of the zingchart object.

400 | 300 | ...

xNumeric

The x position of the click relative to the chart position.

230 | 140 | ...

yNumeric

The height of the zingchart object.

400 | 300 | ...

resize

Dispatches on resize.

https://app.zingsoft.com/demos/embed/RTIZ45MH
https://app.zingsoft.com/demos/embed/RTIZ45MH
AttributeTypeInfo
heightNumeric

The height of the zingchart object.

400 | 300 | ...

idString

The ID of the zingchart object.

"mychart" | ...

outputString

The render output of the zingchart object.

"svg" | "canvas" | "vml"

widthNumeric

The width of the zingchart object.

400 | 300 | ...

Graph Events

gcomplete

Dispatches every time each graph from the graphset is completely rendered, so, even on API calls that require chart repaint.

https://app.zingsoft.com/demos/embed/26ELZCWM
https://app.zingsoft.com/demos/embed/26ELZCWM
AttributeTypeInfo
graphidString

The ID of the graph object.

"mygraph" | 0 | 1 | ...

heightNumeric

The height of the graph.

400 | 300 | ...

idString

The ID of the zingchart object.

"mychart" | ...

loaderObject

Object containing graphset information.

{...} | ...

widthNumeric

The width of the graph.

400 | 300 | ...

xNumeric

The x position of the graph.

400 | 300 | ...

yNumeric

The y of the graph.

400 | 300 | ...

gload

Dispatches only the first time each graph from the graphset is completely rendered.

https://app.zingsoft.com/demos/embed/8C3O29EQ
https://app.zingsoft.com/demos/embed/8C3O29EQ
AttributeTypeInfo
graphidString

The ID of the graph object.

"mygraph" | 0 | 1 | ...

heightNumeric

The height of the graph.

400 | 300 | ...

idString

The ID of the zingchart object.

"mychart" | ...

loaderObject

Object containing graphset information.

{...} | ...

widthNumeric

The width of the graph.

400 | 300 | ...

xNumeric

The x position of the graph.

400 | 300 | ...

yNumeric

The y of the graph.

400 | 300 | ...

History Events

history_back

Dispatches when the user backs through history.

AttributeTypeInfo
idString

The ID of the zingchart object.

"mychart" | ...

indexNumericThe index in history the user is at.

history_forward

Dispatches when the user goes forward through the history.

AttributeTypeInfo
idString

The ID of the zingchart object.

"mychart" | ...

indexNumericThe index in history the user is at.

Interactive Events

node_deselect

Dispatches when the node is no longer selected.

AttributeTypeInfo
graphidString

The ID of the graph object.

"mygraph" | 0 | 1 | ...

idString

The ID of the zingchart object.

"mychart" | ...

keyNumericThe node's key.
nodeindexNumeric

The index of the node.

0 | 8 | 20 | ...

plotindexNumeric

The index of the plot.

0 | 1 | ...

textStringThe text that would display in the tooltip for the node.
valueNumericThe value of the node.

node_select

Dispatches when the node is selected.

AttributeTypeInfo
graphidString

The ID of the graph object.

"mygraph" | 0 | 1 | ...

idString

The ID of the zingchart object.

"mychart" | ...

keyNumericThe node's key.
nodeindexNumeric

The index of the node.

0 | 8 | 20 | ...

plotindexNumeric

The index of the plot.

0 | 1 | ...

textStringThe text that would display in the tooltip for the node.
valueNumericThe value of the node.

plot_deselect

Dispatches when a plot is no longer selected.

AttributeTypeInfo
graphidString

The ID of the graph object.

"mygraph" | 0 | 1 | ...

idString

The ID of the zingchart object.

"mychart" | ...

plotindexNumeric

The index of the plot.

0 | 1 | ...

plot_select

Dispatches when a plot is selected.

AttributeTypeInfo
graphidString

The ID of the graph object.

"mygraph" | 0 | 1 | ...

idString

The ID of the zingchart object.

"mychart" | ...

plotindexNumeric

The index of the plot.

0 | 1 | ...

Legend Events

legend_item_click

Dispatches when a legend item is clicked.

https://app.zingsoft.com/demos/embed/0647492O
https://app.zingsoft.com/demos/embed/0647492O
AttributeTypeInfo
graphidString

The ID of the graph object.

"mygraph" | 0 | 1 | ...

idString

The ID of the zingchart object.

"mychart" | ...

plotidString

The id of the plot (if any).

"mylineplot" | ...

plotindexNumeric

The index of the plot.

0 | 1 | ...

visibleBoolean

The status of the legend item before the click.

true | false | 1 | 0

xdataObject

The collection of extra data associated with the plot via data-XXX attributes.

{...}

legend_marker_click

Dispatches when a legend marker is clicked.

https://app.zingsoft.com/demos/embed/1Y92Y0BQ
https://app.zingsoft.com/demos/embed/1Y92Y0BQ
AttributeTypeInfo
graphidString

The ID of the graph object.

"mygraph" | 0 | 1 | ...

idString

The ID of the zingchart object.

"mychart" | ...

plotidString

The id of the plot (if any).

"mylineplot" | ...

plotindexNumeric

The index of the plot.

0 | 1 | ...

visibleBoolean

The status of the legend marker before the click.

true | false | 1 | 0

xdataObject

The collection of extra data associated with the plot via data-XXX attributes.

{...}

legend_mouseout

Dispatches when a legend is moused out.

https://app.zingsoft.com/demos/embed/L78G5BZV
https://app.zingsoft.com/demos/embed/L78G5BZV
AttributeTypeInfo
idString

The ID of the zingchart object.

"mychart" | ...

plotidString

The id of the plot (if any).

"mylineplot" | ...

plotinfoObject

Information about the plot.

legend_mouseover

Dispatches when a legend is moused over.

https://app.zingsoft.com/demos/embed/L78G5BZV
https://app.zingsoft.com/demos/embed/L78G5BZV
AttributeTypeInfo
idString

The ID of the zingchart object.

"mychart" | ...

plotidString

The id of the plot (if any).

"mylineplot" | ...

plotinfoObject

Information about the plot.

Node Events

node_click

Dispatches when the user clicks a node.

https://app.zingsoft.com/demos/embed/1XLFCFNS
https://app.zingsoft.com/demos/embed/1XLFCFNS
AttributeTypeInfo
evObject

The event object, containing other possibly valuable data.

{...}

graphidString

The ID of the graph object.

"mygraph" | 0 | 1 | ...

idString

The ID of the zingchart object.

"mychart" | ...

keyMixedThe scale key of the node position.
nodeindexNumeric

The index of the node.

0 | 8 | 20 | ...

plotidString

The id of the plot (if any).

"mylineplot" | ...

plotindexNumeric

The index of the plot.

0 | 1 | ...

textStringThe string representation of the node value.
valueNumericThe node value.

node_doubleclick

Dispatches when the user double clicks a node.

https://app.zingsoft.com/demos/embed/EENNHL5S
https://app.zingsoft.com/demos/embed/EENNHL5S
AttributeTypeInfo
evObject

The event object, containing other possibly valuable data.

{...}

graphidString

The ID of the graph object.

"mygraph" | 0 | 1 | ...

idString

The ID of the zingchart object.

"mychart" | ...

keyMixedThe scale key of the node position.
nodeindexNumeric

The index of the node.

0 | 8 | 20 | ...

plotidString

The id of the plot (if any).

"mylineplot" | ...

plotindexNumeric

The index of the plot.

0 | 1 | ...

textStringThe string representation of the node value.
valueNumericThe node value.

node_mouseout

Dispatches when the user moves out from a node.

https://app.zingsoft.com/demos/embed/61HLKRUJ
https://app.zingsoft.com/demos/embed/61HLKRUJ
AttributeTypeInfo
evObject

The event object, containing other possibly valuable data.

{...}

graphidString

The ID of the graph object.

"mygraph" | 0 | 1 | ...

idString

The ID of the zingchart object.

"mychart" | ...

keyMixedThe scale key of the node position.
nodeindexNumeric

The index of the node.

0 | 8 | 20 | ...

plotidString

The id of the plot (if any).

"mylineplot" | ...

plotindexNumeric

The index of the plot.

0 | 1 | ...

textStringThe string representation of the node value.
valueNumericThe node value.

node_mouseover

Dispatches when the user places the mouse over a node.

https://app.zingsoft.com/demos/embed/0QLQ8RG2
https://app.zingsoft.com/demos/embed/0QLQ8RG2
AttributeTypeInfo
evObject

The event object, containing other possibly valuable data.

{...}

graphidString

The ID of the graph object.

"mygraph" | 0 | 1 | ...

idString

The ID of the zingchart object.

"mychart" | ...

keyMixedThe scale key of the node position.
nodeindexNumeric

The index of the node.

0 | 8 | 20 | ...

plotidString

The id of the plot (if any).

"mylineplot" | ...

plotindexNumeric

The index of the plot.

0 | 1 | ...

textStringThe string representation of the node value.
valueNumericThe node value.

node_set

Dispatches when the user sets the node.

https://app.zingsoft.com/demos/embed/8UPRYP7E
https://app.zingsoft.com/demos/embed/8UPRYP7E
AttributeTypeInfo
idString

The ID of the zingchart object.

"mychart" | ...

graphidString

The ID of the graph object.

"mygraph" | 0 | 1 | ...

plotindexNumeric

The index of the plot.

0 | 1 | ...

nodeindexNumeric

The index of the node.

0 | 8 | 20 | ...

keyMixedThe scale key of the node position.
valueNumericThe node value.
textStringThe string representation of the node value.

Object Events

label_click

Dispatches when the user clicks on a label.

https://app.zingsoft.com/demos/embed/YG71VL8A
https://app.zingsoft.com/demos/embed/YG71VL8A
AttributeTypeInfo
evObject

The event object, containing other possibly valuable data.

{...}

graphidString

The ID of the graph object.

"mygraph" | 0 | 1 | ...

idString

The ID of the zingchart object.

"mychart" | ...

labelidString

The id of the label (if any).

"mylabel" | ...

labelindexNumeric

The index of the label in the labels collection.

0 | 1 | ...

label_mousedown

Dispatches when the user clicks the mouse down on a label.

https://app.zingsoft.com/demos/embed/5GUGVDD1
https://app.zingsoft.com/demos/embed/5GUGVDD1
AttributeTypeInfo
evObject

The event object, containing other possibly valuable data.

{...}

graphidString

The ID of the graph object.

"mygraph" | 0 | 1 | ...

idString

The ID of the zingchart object.

"mychart" | ...

labelidString

The id of the label (if any).

"mylabel" | ...

labelindexNumeric

The index of the label in the labels collection.

0 | 1 | ...

label_mouseout

Dispatches when the user moves the mouse away from a label.

https://app.zingsoft.com/demos/embed/ZG34YX83
https://app.zingsoft.com/demos/embed/ZG34YX83
AttributeTypeInfo
evObject

The event object, containing other possibly valuable data.

{...}

graphidString

The ID of the graph object.

"mygraph" | 0 | 1 | ...

idString

The ID of the zingchart object.

"mychart" | ...

labelidString

The id of the label (if any).

"mylabel" | ...

labelindexNumeric

The index of the label in the labels collection.

0 | 1 | ...

label_mouseover

Dispatches when the user places the mouse over a label.

https://app.zingsoft.com/demos/embed/GC988FT7
https://app.zingsoft.com/demos/embed/GC988FT7
AttributeTypeInfo
evObject

The event object, containing other possibly valuable data.

{...}

graphidString

The ID of the graph object.

"mygraph" | 0 | 1 | ...

idString

The ID of the zingchart object.

"mychart" | ...

labelidString

The id of the label (if any).

"mylabel" | ...

labelindexNumeric

The index of the label in the labels collection.

0 | 1 | ...

label_mouseup

Dispatches when the user clicks the mouse up on a label.

https://app.zingsoft.com/demos/embed/PCRA83PP
https://app.zingsoft.com/demos/embed/PCRA83PP
AttributeTypeInfo
evObject

The event object, containing other possibly valuable data.

{...}

graphidString

The ID of the graph object.

"mygraph" | 0 | 1 | ...

idString

The ID of the zingchart object.

"mychart" | ...

labelidString

The id of the label (if any).

"mylabel" | ...

labelindexNumeric

The index of the label in the labels collection.

0 | 1 | ...

legend_marker_click

Dispatches when the user clicks on a legend marker.

AttributeTypeInfo
evObject

The event object, containing other possibly valuable data.

{...}

graphidString

The ID of the graph object.

"mygraph" | 0 | 1 | ...

idString

The ID of the zingchart object.

"mychart" | ...

shapeidString

The id of the shape (if any).

"myshape" | ...

shapeindexNumeric

The index of the shape in the shapes collection.

0 | 1 | ...

shape_click

Dispatches when the user clicks on a shape.

https://app.zingsoft.com/demos/embed/WFAGWXG2
https://app.zingsoft.com/demos/embed/WFAGWXG2
AttributeTypeInfo
evObject

The event object, containing other possibly valuable data.

{...}

graphidString

The ID of the graph object.

"mygraph" | 0 | 1 | ...

idString

The ID of the zingchart object.

"mychart" | ...

shapeidString

The id of the shape (if any).

"myshape" | ...

shapeindexNumeric

The index of the shape in the shapes collection.

0 | 1 | ...

shape_dblclick

This event fires when the user double-clicks on a shape.

It executes a handler function that includes the following parameters:

ParameterTypeDescription
idStringRepresents the unique id assigned to the chart <div> element, e.g., 'myChart'.
shapeidStringThe name of the map item.
shapeindexNumberThe index number of the map item.

shape_mousemove

This event fires whenever the user moves the mouse over a shape.

It executes a handler function that includes the following parameters:

ParameterTypeDescription
idStringRepresents the unique id assigned to the chart <div> element, e.g., 'myChart'.
shapeidStringThe name of the map item.
shapeindexNumberThe index number of the map item.

shape_mousedown

Dispatches when the user clicks down on a shape.

https://app.zingsoft.com/demos/embed/PQJI1M3F
https://app.zingsoft.com/demos/embed/PQJI1M3F
AttributeTypeInfo
evObject

The event object, containing other possibly valuable data.

{...}

graphidString

The ID of the graph object.

"mygraph" | 0 | 1 | ...

idString

The ID of the zingchart object.

"mychart" | ...

shapeidString

The id of the shape (if any).

"myshape" | ...

shapeindexNumeric

The index of the shape in the shapes collection.

0 | 1 | ...

shape_mouseout

Dispatches when the user moves the mouse away from a shape.

https://app.zingsoft.com/demos/embed/0B0V96AE
https://app.zingsoft.com/demos/embed/0B0V96AE
AttributeTypeInfo
evObject

The event object, containing other possibly valuable data.

{...}

graphidString

The ID of the graph object.

"mygraph" | 0 | 1 | ...

idString

The ID of the zingchart object.

"mychart" | ...

shapeidString

The id of the shape (if any).

"myshape" | ...

shapeindexNumeric

The index of the shape in the shapes collection.

0 | 1 | ...

shape_mouseover

Dispatches when the user places the mouse over a shape.

https://app.zingsoft.com/demos/embed/0B0V96AE
https://app.zingsoft.com/demos/embed/0B0V96AE
AttributeTypeInfo
evObject

The event object, containing other possibly valuable data.

{...}

graphidString

The ID of the graph object.

"mygraph" | 0 | 1 | ...

idString

The ID of the zingchart object.

"mychart" | ...

shapeidString

The id of the shape (if any).

"myshape" | ...

shapeindexNumeric

The index of the shape in the shapes collection.

0 | 1 | ...

shape_mouseup

Dispatches when the user clicks up on a shape.

https://app.zingsoft.com/demos/embed/BT0XVE7O
https://app.zingsoft.com/demos/embed/BT0XVE7O
AttributeTypeInfo
evObject

The event object, containing other possibly valuable data.

{...}

graphidString

The ID of the graph object.

"mygraph" | 0 | 1 | ...

idString

The ID of the zingchart object.

"mychart" | ...

shapeidString

The id of the shape (if any).

"myshape" | ...

shapeindexNumeric

The index of the shape in the shapes collection.

0 | 1 | ...

Plot Events

plot_add

Dispatches when a plot is added to the graph.

https://app.zingsoft.com/demos/embed/3WZ7WEPQ
https://app.zingsoft.com/demos/embed/3WZ7WEPQ
AttributeTypeInfo
dataObject

The new configuration data.

{...}

graphidString

The ID of the graph object.

"mygraph" | 0 | 1 | ...

idString

The ID of the zingchart object.

"mychart" | ...

plotindexNumeric

The index of the plot.

0 | 1 | ...

plot_click

Dispatches when the user clicks a plot.

https://app.zingsoft.com/demos/embed/0ZMDF553
https://app.zingsoft.com/demos/embed/0ZMDF553
AttributeTypeInfo
evObject

The event object, containing other possibly valuable data.

{...}

graphidString

The ID of the graph object.

"mygraph" | 0 | 1 | ...

idString

The ID of the zingchart object.

"mychart" | ...

plotidString

The id of the plot (if any).

"mylineplot" | ...

plotindexNumeric

The index of the plot.

0 | 1 | ...

plot_doubleclick

Dispatches when the user double clicks a plot.

https://app.zingsoft.com/demos/embed/ZEGY5UJ0
https://app.zingsoft.com/demos/embed/ZEGY5UJ0
AttributeTypeInfo
evObject

The event object, containing other possibly valuable data.

{...}

graphidString

The ID of the graph object.

"mygraph" | 0 | 1 | ...

idString

The ID of the zingchart object.

"mychart" | ...

plotidString

The id of the plot (if any).

"mylineplot" | ...

plotindexNumeric

The index of the plot.

0 | 1 | ...

plot_modify

Dispatches when a plot is modified.

https://app.zingsoft.com/demos/embed/1ZUWFBM2
https://app.zingsoft.com/demos/embed/1ZUWFBM2
AttributeTypeInfo
dataObject

The new configuration data.

{...}

graphidString

The ID of the graph object.

"mygraph" | 0 | 1 | ...

idString

The ID of the zingchart object.

"mychart" | ...

plotindexNumeric

The index of the plot.

0 | 1 | ...

plot_mouseout

Dispatches when the user moves out from a plot.

https://app.zingsoft.com/demos/embed/3TJFSF5M
https://app.zingsoft.com/demos/embed/3TJFSF5M
AttributeTypeInfo
evObject

The event object, containing other possibly valuable data.

{...}

graphidString

The ID of the graph object.

"mygraph" | 0 | 1 | ...

idString

The ID of the zingchart object.

"mychart" | ...

plotidString

The id of the plot (if any).

"mylineplot" | ...

plotindexNumeric

The index of the plot.

0 | 1 | ...

plot_mouseover

Dispatches when the user places the mouse over a plot.

https://app.zingsoft.com/demos/embed/J04BWCW9
https://app.zingsoft.com/demos/embed/J04BWCW9
AttributeTypeInfo
evObject

The event object, containing other possibly valuable data.

{...}

graphidString

The ID of the graph object.

"mygraph" | 0 | 1 | ...

idString

The ID of the zingchart object.

"mychart" | ...

plotidString

The id of the plot (if any).

"mylineplot" | ...

plotindexNumeric

The index of the plot.

0 | 1 | ...

plot_remove

Dispatches when a plot is removed.

https://app.zingsoft.com/demos/embed/Z0AUOZYR
https://app.zingsoft.com/demos/embed/Z0AUOZYR
AttributeTypeInfo
graphidString

The ID of the graph object.

"mygraph" | 0 | 1 | ...

idString

The ID of the zingchart object.

"mychart" | ...

plotindexNumeric

The index of the plot.

0 | 1 | ...

Toggle Events

about_hide

Dispatches when the About Screen is closed.

AttributeTypeInfo
idString

The ID of the zingchart object.

"mychart" | ...

about_show

Dispatches when the About Screen is displayed.

AttributeTypeInfo
idString

The ID of the zingchart object.

"mychart" | ...

bugreport_hide

Dispatches when the Report Bug Screen is closed.

AttributeTypeInfo
idString

The ID of the zingchart object.

"mychart" | ...

bugreport_show

Dispatches when the Report Bug Screen is displayed.

AttributeTypeInfo
idString

The ID of the zingchart object.

"mychart" | ...

dimension_change

Dispatches when the dimension is toggled between 2D and 3D.

AttributeTypeInfo
dimensionString

The new dimension.

"2d" | "3d"

idString

The ID of the zingchart object.

"mychart" | ...

typeStringThe new graph type.

legend_hide

Dispatches when the legend is hidden.

AttributeTypeInfo
idString

The ID of the zingchart object.

"mychart" | ...

legend_maximize

Dispatches when the legend is maximized.

AttributeTypeInfo
idString

The ID of the zingchart object.

"mychart" | ...

legend_minimize

Dispatches when the legend is minimized.

AttributeTypeInfo
idString

The ID of the zingchart object.

"mychart" | ...

legend_show

Dispatches when the legend is displayed.

AttributeTypeInfo
idString

The ID of the zingchart object.

"mychart" | ...

lens_hide

Dispatches when the lens is hidden.

AttributeTypeInfo
idString

The ID of the zingchart object.

"mychart" | ...

lens_show

Dispatches when the lens is displayed.

AttributeTypeInfo
idString

The ID of the zingchart object.

"mychart" | ...

plot_hide

Dispatches when a plot is hidden.

AttributeTypeInfo
graphidString

The ID of the graph object.

"mygraph" | 0 | 1 | ...

idString

The ID of the zingchart object.

"mychart" | ...

plotindexNumeric

The index of the plot.

0 | 1 | ...

visibleBoolean

Specifies if the plot is visible or hidden.

true | false | 1 | 0

plot_show

Dispatches when a plot is shown after being hidden.

AttributeTypeInfo
graphidString

The ID of the graph object.

"mygraph" | 0 | 1 | ...

idString

The ID of the zingchart object.

"mychart" | ...

plotindexNumeric

The index of the plot.

0 | 1 | ...

visibleBoolean

Specifies if the plot is visible or hidden.

true | false | 1 | 0

source_hide

Dispatches when the Source Screen is hidden.

AttributeTypeInfo
idString

The ID of the zingchart object.

"mychart" | ...

source_show

Dispatches when the source is displayed.

AttributeTypeInfo
idString

The ID of the zingchart object.

"mychart" | ...

Zoom Events

zoom

Dispatches when a zoom event occurs.

https://app.zingsoft.com/demos/embed/GM8MDKNP
https://app.zingsoft.com/demos/embed/GM8MDKNP
AttributeTypeInfo
graphidString

The ID of the graph object.

"mygraph" | 0 | 1 | ...

idString

The ID of the zingchart object.

"mychart" | ...

actionString

The type of zoom action.

"zoomin" | "zoomout" | "viewall"

kmaxNumeric

Specifies the key scale value corresponding to the end position on x axis.

5 | 10 | ...

kminNumeric

Specifies the key scale value corresponding to the start position on x axis.

5 | 10 | ...

xmaxNumeric

Specifies the end position on x axis.

5 | 10 | ...

xminNumeric

Specifies the start position on x axis.

5 | 10 | ...

ymaxNumeric

Specifies the end position on y axis.

5 | 10 | ...

yminNumeric

Specifies the start position on y axis.

5 | 10 | ...

zoomxBoolean

Specifies if the zoom was performed on x axis.

true | false | 1 | 0

zoomyBoolean

Specifies if the zoom was performed on y axis.

true | false | 1 | 0

On This Page