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.
There are 4 methods used to configure chart event-listeners.
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 | ... |
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 } } });
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; } }
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
!
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. |
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. |
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 |
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. |
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. |
Dispatches when the user exports the graph data.
Introduced in: v2.8.
Parameter | Type | Description |
---|---|---|
id | String | The id of the ZingChart object. |
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 |
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. |
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. |
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. |
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. |
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. |
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. |
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 |
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 |
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. |
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. |
Dispatches when loaded modules are ready for use.
Parameter | Type | Description |
---|---|---|
id | String | The id of the ZingChart object. |
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. |
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. |
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. |
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 |
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. | Array of objects representing plot and node information for the guide position with the following keys: plotindex, nodeindex, value, text. |
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. | Array of objects representing plot and node information for the guide position with the following keys: plotindex, nodeindex, value, text. |
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 |
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 |
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 |
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. |
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. |
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. |
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. |
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. |
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. |
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. |
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. |
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. |
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. |
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 |
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. |
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. |
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 |
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 |
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. |
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. |
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 |
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. |
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. |
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. |
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. |
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. |
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. |
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. |
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. |
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. |
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. |
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. |
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. |
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. |
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. |
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. |
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. |
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 |
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. |
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 |
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 |
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 |
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. | The selected node objects |
plotarea | Boolean | Specifies whether the selection was performed inside plotarea. |
selection | Array. | The selected node indices by plot |
touch | Boolean | Specifies whether the environment is touch based. |
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. | List of [x,y] points of the selection tool. |
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. | The selected node objects |
plotarea | Boolean | Specifies whether the selection was performed inside plotarea. |
selection | Array. | The selected node indices by plot |
touch | Boolean | Specifies whether the environment is touch based. |
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. |
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. |
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. |
Dispatches when the About Screen is closed.
Introduced in: v2.1.0
Demo
Parameter | Type | Description |
---|---|---|
id | String | The id of the ZingChart object. |
Dispatches when the About Screen is displayed.
Introduced in: v2.1.0
Demo
Parameter | Type | Description |
---|---|---|
id | String | The id of the ZingChart object. |
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. |
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. |
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. |
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. |
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. |
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. |
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. |
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 |
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. |
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. |