Event Reference
ZingChart provides a rich API for controlling chart characteristics such as 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;
}
});
Attribute | Type | Info |
---|---|---|
eventName | String |
The name of the event. "load" | "complete" | ... |
handler | Function |
Handler fired when the event takes place. function(params) {...} |
id | String |
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 unbind an event that was bound using .bind()
.
zingchart.bind('chartId', 'bind', customFunction);
zingchart.unbind('chartId', 'load', customFunction);
You cannot use unbind
on anonymous functions, and unbind
will not take a function definition as a parameter like bind
will. You must pass the same function name as the third parameter for bind
and unbind
to work. Be careful when using bind
and unbind
!
Animation
animation_end
Dispatches when the animation ends.
Demo
Parameter | Type | Description |
---|---|---|
graphid | String | The id of the graph object. |
id | String | The id of the ZingChart object. |
animation_start
Dispatches when the animation starts.
Demo
Parameter | Type | Description |
---|---|---|
graphid | String | The id of the graph object. |
id | String | The id of the ZingChart object. |
animation_step
Dispatches on every step of the animation, for every plot/node.
Demo
Parameter | Type | Description |
---|---|---|
graphid | String | The id of the graph object. |
id | String | The id of the ZingChart object. |
plotindex | Number | The index of the plot |
nodeindex | Number | The index of the node |
stage | Number | The "position" in the animation timeline. It starts from 0 and ends at 1, but for several animation methods, intermediate values can exceed 1. |
value | Number | The node value |
Dragging
zingchart.plugins.dragging.complete
Dispatches at the end of data-dragging action.
Parameter | Type | Description |
---|---|---|
dataDragging | Boolean | Whether dragging is enabled. |
graphid | String | The id of the graph object. |
id | String | The id of the ZingChart object. |
plotindex | Number | The index of the plot. |
nodeindex | Number | The index of the node. |
scaletext | String | The label of the scale. |
scaleval | Number | The value of the scale. |
text | String | The node value. |
stage | Number | The "position" in the animation timeline. It starts from 0 and ends at 1, but for several animation methods, intermediate values can exceed 1. |
zingchart.plugins.dragging.update.type | String | Drag update type. |
zingchart.plugins.dragging.update.value | Number | Drag update value. |
zingchart.plugins.dragging.update
Dispatches on every drag update.
Parameter | Type | Description |
---|---|---|
dataDragging | Boolean | Whether dragging is enabled. |
graphid | String | The id of the graph object. |
id | String | The id of the ZingChart object. |
plotindex | Number | The index of the plot. |
nodeindex | Number | The index of the node. |
scaletext | String | The label of the scale. |
scaleval | Number | The value of the scale. |
text | String | The node value. |
stage | Number | The "position" in the animation timeline. It starts from 0 and ends at 1, but for several animation methods, intermediate values can exceed 1. |
zingchart.plugins.dragging.update.type | String | Drag update type. |
zingchart.plugins.dragging.update.value | Number | Drag update value. |
Export
dataexport
Dispatches when the user exports the graph data.
Introduced in: v2.8.
Parameter | Type | Description |
---|---|---|
id | String | The id of the ZingChart object. |
Global
beforedestroy
Dispatches after the destroy API method is called, before the chart is destroyed
Introduced in: v1.2.0
Demo
Parameter | Type | Description |
---|---|---|
id | String | The id of the ZingChart object. |
loader | Object | The chart loader information |
complete
Dispatches every time a graphset is completely rendered, even on API calls that require chart repaint.
Demo
Parameter | Type | Description |
---|---|---|
id | String | The id of the ZingChart object. |
height | Number | The height of the ZingChart object. |
output | String | The render output of the zingchart object; one of: "svg", "canvas", "vml" |
width | Number | The width of the ZingChart object. |
dataload
Dispatches when data is loaded to the ZingChart object
Demo
Parameter | Type | Description |
---|---|---|
data | Object | The new plot data |
plotindex | Number | The index of the new plot |
graphid | String | The id of the graph object containing the plot |
id | String | The id of the ZingChart object. |
dataparse
Dispatches when the data is available for the chart, prior to parsing routines. Useful for changing/adding elements into the data.
Demo
Parameter | Type | Description |
---|---|---|
id | String | The id of the ZingChart object. |
height | Number | The height of the ZingChart object. |
output | String | The render output of the zingchart object; one of: "svg", "canvas", "vml" |
width | Number | The width of the ZingChart object. |
dataready
Dispatches when the data is ready to be parsed.
Demo
Parameter | Type | Description |
---|---|---|
id | String | The id of the ZingChart object. |
height | Number | The height of the ZingChart object. |
output | String | The render output of the zingchart object; one of: "svg", "canvas", "vml" |
width | Number | The width of the ZingChart object. |
destroy
Dispatches after the destroy API method is called, after the chart is destroyed
Introduced in: v1.2.0
Demo
Parameter | Type | Description |
---|---|---|
id | String | The id of the ZingChart object. |
error
Dispatches on an API error
Parameter | Type | Description |
---|---|---|
id | String | The id of the ZingChart object. |
error | Object | The error that occured. |
section | String | Contains a short description of the main code section/routine which generated the error. |
json | Object | The full chart JSON at the time of the error. |
gcomplete
Dispatches every time each graph from the graphset is completely rendered, even on API calls that require chart repaint.
Demo
Parameter | Type | Description |
---|---|---|
graphid | String | The id of the graph object |
height | Number | The height of the graph |
id | String | The id of the ZingChart object |
loader | Object | Object containing graphset information |
width | Number | The width of the graph |
x | Number | The x position of the graph |
y | Number | The y position of the graph |
gload
Dispatches only the first time each graph from the graphset is completely rendered.
Demo
Parameter | Type | Description |
---|---|---|
graphid | String | The id of the graph object |
height | Number | The height of the graph |
id | String | The id of the ZingChart object |
loader | Object | Object containing graphset information |
width | Number | The width of the graph |
x | Number | The x position of the graph |
y | Number | The y position of the graph |
load
Dispatches only the first time the graphset is completely rendered. Subsequent chart reloads will not fire this event.
Demo
Parameter | Type | Description |
---|---|---|
id | String | The id of the ZingChart object. |
height | Number | The height of the ZingChart object. |
output | String | The render output of the zingchart object; one of: "svg", "canvas", "vml" |
width | Number | The width of the ZingChart object. |
modify
Dispatches when ZingChart is modified via the modify API call.
Demo
Parameter | Type | Description |
---|---|---|
data | Object | The new configuration data |
graphid | String | The id of the graph object |
id | String | The id of the ZingChart object. |
object | String | The object to modify, if specified in the modify API call. |
modulesready
Dispatches when loaded modules are ready for use.
Parameter | Type | Description |
---|---|---|
id | String | The id of the ZingChart object. |
reload
Dispatches when the chart is reloaded.
Demo
Parameter | Type | Description |
---|---|---|
graphid | String | The id of the graph object. |
id | String | The id of the ZingChart object. |
render
Dispatches when the chart is rendered.
Parameter | Type | Description |
---|---|---|
id | String | The id of the ZingChart object. |
height | Number | The height of the ZingChart object. |
output | String | The render output of the zingchart object; one of: "svg", "canvas", "vml" |
width | Number | The width of the ZingChart object. |
resize
Dispatches on chart resize.
Demo
Parameter | Type | Description |
---|---|---|
id | String | The id of the ZingChart object. |
height | Number | The height of the ZingChart object. |
output | String | The render output of the zingchart object; one of: "svg", "canvas", "vml" |
width | Number | The width of the ZingChart object. |
setdata
Dispatches when the setdata API function is called.
Demo
Parameter | Type | Description |
---|---|---|
graphid | String | The id of the graph object. |
id | String | The id of the ZingChart object. |
data | Object | The new configuration data |
Guide
guide_mousemove
Dispatches when the guide position changes.
Demo
Parameter | Type | Description |
---|---|---|
graphid | String | The id of the graph object |
id | String | The id of the ZingChart object. |
items | Array.<any> | Array of objects representing plot and node information for the guide position with the following keys: plotindex, nodeindex, value, text. |
guide_mouseout
Dispatches when the mouse leaves the chart
Demo
Parameter | Type | Description |
---|---|---|
graphid | String | The id of the graph object |
id | String | The id of the ZingChart object. |
items | Array.<any> | Array of objects representing plot and node information for the guide position with the following keys: plotindex, nodeindex, value, text. |
History
history_back
Dispatches when the user backs through history.
Introduced in: v2.1.0
Demo
Parameter | Type | Description |
---|---|---|
id | String | The id of the ZingChart object. |
index | Number | The index in history that the user is at |
history_forward
Dispatches when the user goes forward through history.
Introduced in: v2.1.0
Demo
Parameter | Type | Description |
---|---|---|
id | String | The id of the ZingChart object. |
index | Number | The index in history that the user is at |
Interactive
heatmap.mousemove
Dispatches when a user moves a mouse over a heatmap
Introduced in: v2.8.6
Demo
Parameter | Type | Description |
---|---|---|
id | String | The id of the ZingChart object. |
graphid | String | The id of the graph. |
ev | Object | The event. |
x | Number | The x location of the mouse |
y | Number | The y location of the mouse |
value | Number | The value of the heatmap at the mouse location |
menu_item_click
Dispatches when a menu item is clicked from within the context-menu.
Demo
Parameter | Type | Description |
---|---|---|
event | Object | The click event object, containing other possibly valuable data. |
graphid | String | The id of the graph object |
height | Number | The height of the ZingChart object. |
id | String | The id of the ZingChart object. |
menuitemid | String | The id of the menu item being clicked |
targetid | String | The id of the DOM element being clicked |
width | Number | The width of the ZingChart object. |
x | Number | The x position of the click relative tto the chart position. |
y | Number | The y position of the click relative tto the chart position. |
mousewheel
Triggers a mouseheel event whenever the mouse wheel is activated over a chart zone.
Parameter | Type | Description |
---|---|---|
data | Object | The new plot data |
plotindex | Number | The index of the new plot |
graphid | String | The id of the graph object containing the plot |
id | String | The id of the ZingChart object. |
swipe
Triggers a swipe event, applicable only on touch devices.
Parameter | Type | Description |
---|---|---|
id | String | The id of the ZingChart object. |
height | Number | The height of the ZingChart object. |
output | String | The render output of the zingchart object; one of: "svg", "canvas", "vml" |
width | Number | The width of the ZingChart object. |
Label
label_click
Dispatches when the user clicks on a label.
Demo
Parameter | Type | Description |
---|---|---|
ev | Object | The event object, containing other possibly valuable data. |
graphid | String | The ID of the graph object. |
id | String | The ID of the ZingChart object. |
labelid | String | The id of the label (if any). |
labelindex | Number | The index of the label in the labels collection. |
label_dblclick
Dispatches when the user double clicks on a label.
Demo
Parameter | Type | Description |
---|---|---|
ev | Object | The event object, containing other possibly valuable data. |
graphid | String | The ID of the graph object. |
id | String | The ID of the ZingChart object. |
labelid | String | The id of the label (if any). |
labelindex | Number | The index of the label in the labels collection. |
label_mousedown
Dispatches when the user clicks the mouse down on a label.
Demo
Parameter | Type | Description |
---|---|---|
ev | Object | The event object, containing other possibly valuable data. |
graphid | String | The ID of the graph object. |
id | String | The ID of the ZingChart object. |
labelid | String | The id of the label (if any). |
labelindex | Number | The index of the label in the labels collection. |
label_mousemove
Dispatches when the mouse moves over the label
Demo
Parameter | Type | Description |
---|---|---|
ev | Object | The event object, containing other possibly valuable data. |
graphid | String | The ID of the graph object. |
id | String | The ID of the ZingChart object. |
labelid | String | The id of the label (if any). |
labelindex | Number | The index of the label in the labels collection. |
label_mouseout
Dispatches when the user moves the mouse away from a label.
Demo
Parameter | Type | Description |
---|---|---|
ev | Object | The event object, containing other possibly valuable data. |
graphid | String | The ID of the graph object. |
id | String | The ID of the ZingChart object. |
labelid | String | The id of the label (if any). |
labelindex | Number | The index of the label in the labels collection. |
label_mouseover
Dispatches when the user places the mouse over a label.
Demo
Parameter | Type | Description |
---|---|---|
ev | Object | The event object, containing other possibly valuable data. |
graphid | String | The ID of the graph object. |
id | String | The ID of the ZingChart object. |
labelid | String | The id of the label (if any). |
labelindex | Number | The index of the label in the labels collection. |
label_mouseup
Dispatches when the user clicks the mouse up on a label.
Demo
Parameter | Type | Description |
---|---|---|
ev | Object | The event object, containing other possibly valuable data. |
graphid | String | The ID of the graph object. |
id | String | The ID of the ZingChart object. |
labelid | String | The id of the label (if any). |
labelindex | Number | The index of the label in the labels collection. |
Legend
legend_hide
Dispatches when the legend is minimized.
Introduced in: v2.1.0
Demo
Parameter | Type | Description |
---|---|---|
id | String | The id of the legend |
graphidx | Number | The index of the graph |
graphid | String | The id of the graph |
x | Number | The x position of the graph |
y | Number | The y position of the graph |
width | Number | The width of the graph |
height | Number | The height of the graph |
loader | Object | Loader information of the graph |
legend_item_click
Dispatches when a legend item is clicked.
Demo
Parameter | Type | Description |
---|---|---|
graphid | String | The ID of the graph object. |
id | String | The ID of the ZingChart object. |
plotid | String | The id of the plot (if any). |
plotindex | Number | The index of the plot (if any). |
visible | Boolean | The status of the legend item before the click. |
xdata | Object | The collection of extra data associated with the plot via data-XXX attributes. |
legend_marker_click
Dispatches when a legend marker is clicked.
Demo
Parameter | Type | Description |
---|---|---|
graphid | String | The ID of the graph object. |
id | String | The ID of the ZingChart object. |
plotid | String | The id of the plot (if any). |
plotindex | Number | The index of the plot (if any). |
visible | Boolean | The status of the legend item before the click. |
xdata | Object | The collection of extra data associated with the plot via data-XXX attributes. |
legend_maximize
Dispatches when the legend is maximized.
Demo
Parameter | Type | Description |
---|---|---|
id | String | The id of the legend |
graphidx | Number | The index of the graph |
graphid | String | The id of the graph |
x | Number | The x position of the graph |
y | Number | The y position of the graph |
width | Number | The width of the graph |
height | Number | The height of the graph |
loader | Object | Loader information of the graph |
legend_minimize
Dispatches when the legend is minimized.
Demo
Parameter | Type | Description |
---|---|---|
id | String | The id of the legend |
graphidx | Number | The index of the graph |
graphid | String | The id of the graph |
x | Number | The x position of the graph |
y | Number | The y position of the graph |
width | Number | The width of the graph |
height | Number | The height of the graph |
loader | Object | Loader information of the graph |
legend_mouseout
Dispatches when a legend is moused out.
Demo
Parameter | Type | Description |
---|---|---|
id | String | The ID of the ZingChart object. |
plotid | String | The id of the plot (if any). |
plotinfo | Object | Information about the plot. |
legend_mouseover
Dispatches when a legend is moused over.
Demo
Parameter | Type | Description |
---|---|---|
id | String | The ID of the ZingChart object. |
plotid | String | The id of the plot (if any). |
plotinfo | Object | Information about the plot. |
legend_show
Dispatches when the legend is maximized.
Introduced in: v2.1.0
Demo
Parameter | Type | Description |
---|---|---|
id | String | The id of the legend |
graphidx | Number | The index of the graph |
graphid | String | The id of the graph |
x | Number | The x position of the graph |
y | Number | The y position of the graph |
width | Number | The width of the graph |
height | Number | The height of the graph |
loader | Object | Loader information of the graph |
Node
node_add
Dispatches when the user adds a node.
Demo
Parameter | Type | Description |
---|---|---|
graphid | String | The id of the graph object. |
id | String | The id of the ZingChart object. |
key | any | The node's key value. |
nodeindex | Number | The index of the node. |
plotindex | Number | The index of the plot the node was added to. |
text | String | The string representation of the node value. |
value | Number | The node value. |
node_click
Dispatches when the user clicks a node.
Demo
Parameter | Type | Description |
---|---|---|
ev | Object | The event object, containing other possibly valuable data. |
graphid | String | The ID of the graph object. |
id | String | The ID of the ZingChart object. |
key | any | The scale key of the node position |
nodeindex | Number | The index of the node |
text | String | The string representation of the node value. |
value | Number | The node value. |
plotid | String | The ID of the plot object (if any). |
plotindex | Number | The index of the plot. |
node_doubleclick
Dispatches when the user double clicks a node.
Demo
Parameter | Type | Description |
---|---|---|
ev | Object | The event object, containing other possibly valuable data. |
graphid | String | The ID of the graph object. |
id | String | The ID of the ZingChart object. |
key | any | The scale key of the node position |
nodeindex | Number | The index of the node |
text | String | The string representation of the node value. |
value | Number | The node value. |
plotid | String | The ID of the plot object (if any). |
plotindex | Number | The index of the plot. |
node_mousedown
Dispatches when the user mouses down on a node
Demo
Parameter | Type | Description |
---|---|---|
ev | Object | The event object, containing other possibly valuable data. |
graphid | String | The ID of the graph object. |
id | String | The ID of the ZingChart object. |
key | any | The scale key of the node position |
nodeindex | Number | The index of the node |
text | String | The string representation of the node value. |
value | Number | The node value. |
plotid | String | The ID of the plot object (if any). |
plotindex | Number | The index of the plot. |
node_mouseout
Dispatches when the user moves out from a node.
Demo
Parameter | Type | Description |
---|---|---|
ev | Object | The event object, containing other possibly valuable data. |
graphid | String | The ID of the graph object. |
id | String | The ID of the ZingChart object. |
key | any | The scale key of the node position |
nodeindex | Number | The index of the node |
text | String | The string representation of the node value. |
value | Number | The node value. |
plotid | String | The ID of the plot object (if any). |
plotindex | Number | The index of the plot. |
node_mouseover
Dispatches when the user places the mouse over a node.
Demo
Parameter | Type | Description |
---|---|---|
ev | Object | The event object, containing other possibly valuable data. |
graphid | String | The ID of the graph object. |
id | String | The ID of the ZingChart object. |
key | any | The scale key of the node position |
nodeindex | Number | The index of the node |
text | String | The string representation of the node value. |
value | Number | The node value. |
plotid | String | The ID of the plot object (if any). |
plotindex | Number | The index of the plot. |
node_mouseup
Dispatches when the user mouses up on a node.
Demo
Parameter | Type | Description |
---|---|---|
ev | Object | The event object, containing other possibly valuable data. |
graphid | String | The ID of the graph object. |
id | String | The ID of the ZingChart object. |
key | any | The scale key of the node position |
nodeindex | Number | The index of the node |
text | String | The string representation of the node value. |
value | Number | The node value. |
plotid | String | The ID of the plot object (if any). |
plotindex | Number | The index of the plot. |
node_remove
Dispatches when the user removes a node.
Demo
Parameter | Type | Description |
---|---|---|
graphid | String | The id of the graph object. |
id | String | The id of the ZingChart object. |
key | any | The node's key value. |
nodeindex | Number | The index of the node. |
plotindex | Number | The index of the plot the node was added to. |
text | String | The string representation of the node value. |
value | Number | The node value. |
node_set
Dispatches when the user sets a node using the setnodevalue API call.
Demo
Parameter | Type | Description |
---|---|---|
id | String | The id of the ZingChart object. |
graphid | String | The id of the graph object. |
plotindex | Number | The index of the plot the node was set on. |
nodeindex | Number | The index of the node. |
key | any | The node's key value. |
value | Number | The node value. |
text | String | The string representation of the node value. |
Plot
plot_add
Dispatches when a plot is added to the graph.
Demo
Parameter | Type | Description |
---|---|---|
data | Object | The new plot data |
plotindex | Number | The index of the new plot |
graphid | String | The id of the graph object containing the plot |
id | String | The id of the ZingChart object. |
plot_click
Dispatches when the user clicks a plot.
Demo
Parameter | Type | Description |
---|---|---|
ev | Object | The event object, containing other possibly valuable data. |
graphid | String | The ID of the graph object. |
id | String | The ID of the ZingChart object. |
plotid | String | The ID of the plot object (if any). |
plotindex | Number | The index of the plot. |
plottext | String | The text of the plot. |
plot_doubleclick
Dispatches when the user double clicks a plot.
Demo
Parameter | Type | Description |
---|---|---|
ev | Object | The event object, containing other possibly valuable data. |
graphid | String | The ID of the graph object. |
id | String | The ID of the ZingChart object. |
plotid | String | The ID of the plot object (if any). |
plotindex | Number | The index of the plot. |
plot_modify
Dispatches when a plot is modified.
Demo
Parameter | Type | Description |
---|---|---|
data | Object | The new configuration data |
graphid | String | The id of the graph object |
id | String | The id of the ZingChart object. |
plotindex | Number | The index of the modified plot. |
plot_mouseout
Dispatches when the user moves out from a plot.
Introduced in: vundefined
Demo
Parameter | Type | Description |
---|---|---|
ev | Object | The event object, containing other possibly valuable data. |
graphid | String | The ID of the graph object. |
id | String | The ID of the ZingChart object. |
plotid | String | The ID of the plot object (if any). |
plotindex | Number | The index of the plot. |
plot_mouseup
Dispatches when the user mouses up on a plot
Demo
Parameter | Type | Description |
---|---|---|
ev | Object | The event object, containing other possibly valuable data. |
graphid | String | The ID of the graph object. |
id | String | The ID of the ZingChart object. |
plotid | String | The ID of the plot object (if any). |
plotindex | Number | The index of the plot. |
plot_remove
Dispatches when a plot is removed from the graph.
Demo
Parameter | Type | Description |
---|---|---|
plotindex | Number | The index of the removed plot |
graphid | String | The id of the graph object containing the plot |
id | String | The id of the ZingChart object. |
Refresh
feed_clear
Dispatches when the feed is cleared.
Introduced in: v1.18.0
Demo
Parameter | Type | Description |
---|---|---|
id | String | The id of the ZingChart object. |
graphidx | Number | The graph index. |
graphid | String | The id of the graph. |
x | Number | The x position of the graph. |
y | Number | The y position of the graph. |
width | Number | The width of the graph. |
height | Number | The height of the graph. |
loader | Object | Additional graph loader information |
feed_interval_modify
Dispatches when the feed interval is modified.
Introduced in: v2.1.0
Demo
Parameter | Type | Description |
---|---|---|
id | String | The id of the ZingChart object. |
graphidx | Number | The graph index. |
graphid | String | The id of the graph. |
x | Number | The x position of the graph. |
y | Number | The y position of the graph. |
width | Number | The width of the graph. |
height | Number | The height of the graph. |
loader | Object | Additional graph loader information |
interval | Number | The new feed interval. |
feed_start
Dispatches when the feed starts.
Introduced in: v2.1.0
Demo
Parameter | Type | Description |
---|---|---|
id | String | The id of the ZingChart object. |
graphidx | Number | The graph index. |
graphid | String | The id of the graph. |
x | Number | The x position of the graph. |
y | Number | The y position of the graph. |
width | Number | The width of the graph. |
height | Number | The height of the graph. |
loader | Object | Additional graph loader information |
feed_step
Dispatches on every step of the feed.
Demo
Parameter | Type | Description |
---|---|---|
id | String | The id of the ZingChart object. |
graphidx | Number | The graph index. |
graphid | String | The id of the graph. |
x | Number | The x position of the graph. |
y | Number | The y position of the graph. |
width | Number | The width of the graph. |
height | Number | The height of the graph. |
loader | Object | Additional graph loader information |
feed_stop
Dispatches when the feed stops.
Introduced in: v2.1.0
Demo
Parameter | Type | Description |
---|---|---|
id | String | The id of the ZingChart object. |
graphidx | Number | The graph index. |
graphid | String | The id of the graph. |
x | Number | The x position of the graph. |
y | Number | The y position of the graph. |
width | Number | The width of the graph. |
height | Number | The height of the graph. |
loader | Object | Additional graph loader information |
Selection
zingchart.plugins.selection-tool.beforeselection
Fires before the selection is made
Introduced in: v2.5.0
Demo
Parameter | Type | Description |
---|---|---|
ev | Object | The mouse event |
graphid | String | The id of the graph |
id | String | The id of the ZingChart object |
nodes | Array.<any> | The selected node objects |
plotarea | Boolean | Specifies whether the selection was performed inside plotarea. |
selection | Array.<any> | The selected node indices by plot |
touch | Boolean | Specifies whether the environment is touch based. |
zingchart.plugins.selection-tool.mouseup
Dispatches when the user mouses up after selection
Introduced in: v2.5.0
Demo
Parameter | Type | Description |
---|---|---|
ev | Object | The mouse event |
graphid | String | The id of the graph |
id | String | The id of the ZingChart object |
poly | Array.<Number> | List of [x,y] points of the selection tool. |
zingchart.plugins.selection-tool.selection
Fires when a selection is set
Introduced in: v2.5.0
Demo
Parameter | Type | Description |
---|---|---|
ev | Object | The mouse event |
graphid | String | The id of the graph |
id | String | The id of the ZingChart object |
nodes | Array.<any> | The selected node objects |
plotarea | Boolean | Specifies whether the selection was performed inside plotarea. |
selection | Array.<any> | The selected node indices by plot |
touch | Boolean | Specifies whether the environment is touch based. |
Shape
shape_click
Dispatches when the user clicks on a shape.
Demo
Parameter | Type | Description |
---|---|---|
ev | Object | The event object, containing other possibly valuable data. |
graphid | String | The ID of the graph object. |
id | String | The ID of the ZingChart object. |
shapeid | String | The id of the shape (if any). |
shapeindex | Number | The index of the shape in the shapes collection. |
shape_dblclick
Dispatches when the user double clicks on a shape.
Demo
Parameter | Type | Description |
---|---|---|
ev | Object | The event object, containing other possibly valuable data. |
graphid | String | The ID of the graph object. |
id | String | The ID of the ZingChart object. |
shapeid | String | The id of the shape (if any). |
shapeindex | Number | The index of the shape in the shapes collection. |
shape_mousedown
Dispatches when the user clicks down on a shape.
Demo
Parameter | Type | Description |
---|---|---|
ev | Object | The event object, containing other possibly valuable data. |
graphid | String | The ID of the graph object. |
id | String | The ID of the ZingChart object. |
shapeid | String | The id of the shape (if any). |
shapeindex | Number | The index of the shape in the shapes collection. |
Toggle
about_hide
Dispatches when the About Screen is closed.
Introduced in: v2.1.0
Demo
Parameter | Type | Description |
---|---|---|
id | String | The id of the ZingChart object. |
about_show
Dispatches when the About Screen is displayed.
Introduced in: v2.1.0
Demo
Parameter | Type | Description |
---|---|---|
id | String | The id of the ZingChart object. |
Zoom
beforezoom
Dispatches before the chart is zoomed. Can completely stop zooming operation if event handler returns false
Introduced in: v2.8.9
Demo
Parameter | Type | Description |
---|---|---|
id | String | The id of the ZingChart object. |
graphid | String | The id of the graph object. |
ev | Object | The event. |
shape_mousemove
This event fires whenever the user moves the mouse over a shape.
Demo
Parameter | Type | Description |
---|---|---|
ev | Object | The event object, containing other possibly valuable data. |
graphid | String | The ID of the graph object. |
id | String | The ID of the ZingChart object. |
shapeid | String | The id of the shape (if any). |
shapeindex | Number | The index of the shape in the shapes collection. |
Shape
shape_mouseout
Dispatches when the user moves the mouse away from a shape.
Demo
Parameter | Type | Description |
---|---|---|
ev | Object | The event object, containing other possibly valuable data. |
graphid | String | The ID of the graph object. |
id | String | The ID of the ZingChart object. |
shapeid | String | The id of the shape (if any). |
shapeindex | Number | The index of the shape in the shapes collection. |
shape_mouseover
Dispatches when the user mouses over on a shape.
Demo
Parameter | Type | Description |
---|---|---|
ev | Object | The event object, containing other possibly valuable data. |
graphid | String | The ID of the graph object. |
id | String | The ID of the ZingChart object. |
shapeid | String | The id of the shape (if any). |
shapeindex | Number | The index of the shape in the shapes collection. |
shape_mouseup
Dispatches when the user clicks up on a shape.
Demo
Parameter | Type | Description |
---|---|---|
ev | Object | The event object, containing other possibly valuable data. |
graphid | String | The ID of the graph object. |
id | String | The ID of the ZingChart object. |
shapeid | String | The id of the shape (if any). |
shapeindex | Number | The index of the shape in the shapes collection. |
Toggle
source_hide
Dispatches when the source is hidden.
Introduced in: v2.1.0
Demo
Parameter | Type | Description |
---|---|---|
id | String | The id of the ZingChart object. |
height | Number | The height of the ZingChart object. |
output | String | The render output of the zingchart object; one of: "svg", "canvas", "vml" |
width | Number | The width of the ZingChart object. |
source_show
Dispatches when the source is displayed.
Introduced in: v2.1.0
Demo
Parameter | Type | Description |
---|---|---|
id | String | The id of the ZingChart object. |
height | Number | The height of the ZingChart object. |
output | String | The render output of the zingchart object; one of: "svg", "canvas", "vml" |
width | Number | The width of the ZingChart object. |
Zoom
maps.zoom
Dispatches when a map is zoomed in/out on.
Parameter | Type | Description |
---|---|---|
bbox | Object | Bounding box of the graph |
graphinfo | Object | The chart JSON |
groups | Array | Any set map groups |
height | Number | Height of the chart |
id | String | ID of the map |
ignore | Array | Any set ignored regions |
items | Array | Map items |
loaderid | String | The id of the chart element |
offsetX | Number | Panning offset in the x direction |
offsetY | Number | Panning offset in the y direction |
panning | Boolean | Whether panning is enabled |
scrolling | Boolean | Whether scrolling is enabled |
width | Number | Width of the chart |
x | Number | X position |
y | Number | Y position |
zoom | Number | The zoom level |
zooming | Number | Whether zooming is enabled |
postzoom
Dispatches after a zoom event is completed.
Demo
Parameter | Type | Description |
---|---|---|
graphid | String | The ID of the graph object. |
id | String | The ID of the ZingChart object. |
action | String | The type of zoom action: "zoomin", "zoomout", or "viewall" |
kmax | Number | Specifies the key scale value corresponding to the end position on x axis. |
kmin | Number | Specifies the key scale value corresponding to the start position on x axis. |
xmax | Number | Specifies the end position on x axis. |
xmin | Number | Specifies the start position on x axis. |
ymax | Number | Specifies the end position on y axis. |
ymin | Number | Specifies the start position on y axis. |
zoomx | Boolean | Specifies if the zoom was performed on x axis. |
zoomy | Boolean | Specifies if the zoom was performed on y axis. |
xZoomed | Boolean | Specifies if the x axis is zoomed at the time of the event. |
yZoomed | Boolean | Specifies if the y axis is zoomed at the time of the event. |
zoom
Dispatches when a zoom event occurs.
Demo
Parameter | Type | Description |
---|---|---|
graphid | String | The ID of the graph object. |
id | String | The ID of the ZingChart object. |
action | String | The type of zoom action: "zoomin", "zoomout", or "viewall" |
kmax | Number | Specifies the key scale value corresponding to the end position on x axis. |
kmin | Number | Specifies the key scale value corresponding to the start position on x axis. |
xmax | Number | Specifies the end position on x axis. |
xmin | Number | Specifies the start position on x axis. |
ymax | Number | Specifies the end position on y axis. |
ymin | Number | Specifies the start position on y axis. |
zoomx | Boolean | Specifies if the zoom was performed on x axis. |
zoomy | Boolean | Specifies if the zoom was performed on y axis. |
xZoomed | Boolean | Specifies if the x axis is zoomed at the time of the event. |
yZoomed | Boolean | Specifies if the y axis is zoomed at the time of the event. |