• Getting Started

  • Data

  • Chart Types

  • Chart Elements

  • Integrations

  • API

  • Tools

  • FAQ

  • Change Log

  • 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
    graphidStringThe id of the graph object.
    idStringThe id of the ZingChart object.

    animation_start

    Dispatches when the animation starts.
    Demo

    Parameter Type Description
    graphidStringThe id of the graph object.
    idStringThe id of the ZingChart object.

    animation_step

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

    Parameter Type Description
    graphidStringThe id of the graph object.
    idStringThe id of the ZingChart object.
    plotindexNumberThe index of the plot
    nodeindexNumberThe index of the node
    stageNumberThe "position" in the animation timeline. It starts from 0 and ends at 1, but for several animation methods, intermediate values can exceed 1.
    valueNumberThe node value

    Dragging

    zingchart.plugins.dragging.complete

    Dispatches at the end of data-dragging action.

    Parameter Type Description
    dataDraggingBooleanWhether dragging is enabled.
    graphidStringThe id of the graph object.
    idStringThe id of the ZingChart object.
    plotindexNumberThe index of the plot.
    nodeindexNumberThe index of the node.
    scaletextStringThe label of the scale.
    scalevalNumberThe value of the scale.
    textStringThe node value.
    stageNumberThe "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.typeStringDrag update type.
    zingchart.plugins.dragging.update.valueNumberDrag update value.

    zingchart.plugins.dragging.update

    Dispatches on every drag update.

    Parameter Type Description
    dataDraggingBooleanWhether dragging is enabled.
    graphidStringThe id of the graph object.
    idStringThe id of the ZingChart object.
    plotindexNumberThe index of the plot.
    nodeindexNumberThe index of the node.
    scaletextStringThe label of the scale.
    scalevalNumberThe value of the scale.
    textStringThe node value.
    stageNumberThe "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.typeStringDrag update type.
    zingchart.plugins.dragging.update.valueNumberDrag update value.

    Export

    dataexport

    Dispatches when the user exports the graph data.
    Introduced in: v2.8.

    Parameter Type Description
    idStringThe 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
    idStringThe id of the ZingChart object.
    loaderObjectThe chart loader information

    complete

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

    Parameter Type Description
    idStringThe id of the ZingChart object.
    heightNumberThe height of the ZingChart object.
    outputStringThe render output of the zingchart object; one of: "svg", "canvas", "vml"
    widthNumberThe width of the ZingChart object.

    dataload

    Dispatches when data is loaded to the ZingChart object
    Demo

    Parameter Type Description
    dataObjectThe new plot data
    plotindexNumberThe index of the new plot
    graphidStringThe id of the graph object containing the plot
    idStringThe 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
    idStringThe id of the ZingChart object.
    heightNumberThe height of the ZingChart object.
    outputStringThe render output of the zingchart object; one of: "svg", "canvas", "vml"
    widthNumberThe width of the ZingChart object.

    dataready

    Dispatches when the data is ready to be parsed.
    Demo

    Parameter Type Description
    idStringThe id of the ZingChart object.
    heightNumberThe height of the ZingChart object.
    outputStringThe render output of the zingchart object; one of: "svg", "canvas", "vml"
    widthNumberThe 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
    idStringThe id of the ZingChart object.

    error

    Dispatches on an API error

    Parameter Type Description
    idStringThe id of the ZingChart object.
    errorObjectThe error that occured.
    sectionStringContains a short description of the main code section/routine which generated the error.
    jsonObjectThe 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
    graphidStringThe id of the graph object
    heightNumberThe height of the graph
    idStringThe id of the ZingChart object
    loaderObjectObject containing graphset information
    widthNumberThe width of the graph
    xNumberThe x position of the graph
    yNumberThe y position of the graph

    gload

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

    Parameter Type Description
    graphidStringThe id of the graph object
    heightNumberThe height of the graph
    idStringThe id of the ZingChart object
    loaderObjectObject containing graphset information
    widthNumberThe width of the graph
    xNumberThe x position of the graph
    yNumberThe 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
    idStringThe id of the ZingChart object.
    heightNumberThe height of the ZingChart object.
    outputStringThe render output of the zingchart object; one of: "svg", "canvas", "vml"
    widthNumberThe width of the ZingChart object.

    modify

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

    Parameter Type Description
    dataObjectThe new configuration data
    graphidStringThe id of the graph object
    idStringThe id of the ZingChart object.
    objectStringThe object to modify, if specified in the modify API call.

    modulesready

    Dispatches when loaded modules are ready for use.

    Parameter Type Description
    idStringThe id of the ZingChart object.

    reload

    Dispatches when the chart is reloaded.
    Demo

    Parameter Type Description
    graphidStringThe id of the graph object.
    idStringThe id of the ZingChart object.

    render

    Dispatches when the chart is rendered.

    Parameter Type Description
    idStringThe id of the ZingChart object.
    heightNumberThe height of the ZingChart object.
    outputStringThe render output of the zingchart object; one of: "svg", "canvas", "vml"
    widthNumberThe width of the ZingChart object.

    resize

    Dispatches on chart resize.
    Demo

    Parameter Type Description
    idStringThe id of the ZingChart object.
    heightNumberThe height of the ZingChart object.
    outputStringThe render output of the zingchart object; one of: "svg", "canvas", "vml"
    widthNumberThe width of the ZingChart object.

    setdata

    Dispatches when the setdata API function is called.
    Demo

    Parameter Type Description
    graphidStringThe id of the graph object.
    idStringThe id of the ZingChart object.
    dataObjectThe new configuration data

    Guide

    guide_mousemove

    Dispatches when the guide position changes.
    Demo

    Parameter Type Description
    graphidStringThe id of the graph object
    idStringThe id of the ZingChart object.
    itemsArray.<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
    graphidStringThe id of the graph object
    idStringThe id of the ZingChart object.
    itemsArray.<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
    idStringThe id of the ZingChart object.
    indexNumberThe 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
    idStringThe id of the ZingChart object.
    indexNumberThe 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
    idStringThe id of the ZingChart object.
    graphidStringThe id of the graph.
    evObjectThe event.
    xNumberThe x location of the mouse
    yNumberThe y location of the mouse
    valueNumberThe value of the heatmap at the mouse location

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

    Parameter Type Description
    eventObjectThe click event object, containing other possibly valuable data.
    graphidStringThe id of the graph object
    heightNumberThe height of the ZingChart object.
    idStringThe id of the ZingChart object.
    menuitemidStringThe id of the menu item being clicked
    targetidStringThe id of the DOM element being clicked
    widthNumberThe width of the ZingChart object.
    xNumberThe x position of the click relative tto the chart position.
    yNumberThe 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
    dataObjectThe new plot data
    plotindexNumberThe index of the new plot
    graphidStringThe id of the graph object containing the plot
    idStringThe id of the ZingChart object.

    swipe

    Triggers a swipe event, applicable only on touch devices.

    Parameter Type Description
    idStringThe id of the ZingChart object.
    heightNumberThe height of the ZingChart object.
    outputStringThe render output of the zingchart object; one of: "svg", "canvas", "vml"
    widthNumberThe width of the ZingChart object.

    Label

    label_click

    Dispatches when the user clicks on a label.
    Demo

    Parameter Type Description
    evObjectThe event object, containing other possibly valuable data.
    graphidStringThe ID of the graph object.
    idStringThe ID of the ZingChart object.
    labelidStringThe id of the label (if any).
    labelindexNumberThe index of the label in the labels collection.

    label_dblclick

    Dispatches when the user double clicks on a label.
    Demo

    Parameter Type Description
    evObjectThe event object, containing other possibly valuable data.
    graphidStringThe ID of the graph object.
    idStringThe ID of the ZingChart object.
    labelidStringThe id of the label (if any).
    labelindexNumberThe 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
    evObjectThe event object, containing other possibly valuable data.
    graphidStringThe ID of the graph object.
    idStringThe ID of the ZingChart object.
    labelidStringThe id of the label (if any).
    labelindexNumberThe index of the label in the labels collection.

    label_mousemove

    Dispatches when the mouse moves over the label
    Demo

    Parameter Type Description
    evObjectThe event object, containing other possibly valuable data.
    graphidStringThe ID of the graph object.
    idStringThe ID of the ZingChart object.
    labelidStringThe id of the label (if any).
    labelindexNumberThe 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
    evObjectThe event object, containing other possibly valuable data.
    graphidStringThe ID of the graph object.
    idStringThe ID of the ZingChart object.
    labelidStringThe id of the label (if any).
    labelindexNumberThe index of the label in the labels collection.

    label_mouseover

    Dispatches when the user places the mouse over a label.
    Demo

    Parameter Type Description
    evObjectThe event object, containing other possibly valuable data.
    graphidStringThe ID of the graph object.
    idStringThe ID of the ZingChart object.
    labelidStringThe id of the label (if any).
    labelindexNumberThe 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
    evObjectThe event object, containing other possibly valuable data.
    graphidStringThe ID of the graph object.
    idStringThe ID of the ZingChart object.
    labelidStringThe id of the label (if any).
    labelindexNumberThe 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
    idStringThe id of the legend
    graphidxNumberThe index of the graph
    graphidStringThe id of the graph
    xNumberThe x position of the graph
    yNumberThe y position of the graph
    widthNumberThe width of the graph
    heightNumberThe height of the graph
    loaderObjectLoader information of the graph

    legend_item_click

    Dispatches when a legend item is clicked.
    Demo

    Parameter Type Description
    graphidStringThe ID of the graph object.
    idStringThe ID of the ZingChart object.
    plotidStringThe id of the plot (if any).
    plotindexNumberThe index of the plot (if any).
    visibleBooleanThe status of the legend item before the click.
    xdataObjectThe 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
    graphidStringThe ID of the graph object.
    idStringThe ID of the ZingChart object.
    plotidStringThe id of the plot (if any).
    plotindexNumberThe index of the plot (if any).
    visibleBooleanThe status of the legend item before the click.
    xdataObjectThe collection of extra data associated with the plot via data-XXX attributes.

    legend_maximize

    Dispatches when the legend is maximized.
    Demo

    Parameter Type Description
    idStringThe id of the legend
    graphidxNumberThe index of the graph
    graphidStringThe id of the graph
    xNumberThe x position of the graph
    yNumberThe y position of the graph
    widthNumberThe width of the graph
    heightNumberThe height of the graph
    loaderObjectLoader information of the graph

    legend_minimize

    Dispatches when the legend is minimized.
    Demo

    Parameter Type Description
    idStringThe id of the legend
    graphidxNumberThe index of the graph
    graphidStringThe id of the graph
    xNumberThe x position of the graph
    yNumberThe y position of the graph
    widthNumberThe width of the graph
    heightNumberThe height of the graph
    loaderObjectLoader information of the graph

    legend_mouseout

    Dispatches when a legend is moused out.
    Demo

    Parameter Type Description
    idStringThe ID of the ZingChart object.
    plotidStringThe id of the plot (if any).
    plotinfoObjectInformation about the plot.

    legend_mouseover

    Dispatches when a legend is moused over.
    Demo

    Parameter Type Description
    idStringThe ID of the ZingChart object.
    plotidStringThe id of the plot (if any).
    plotinfoObjectInformation about the plot.

    legend_show

    Dispatches when the legend is maximized.
    Introduced in: v2.1.0
    Demo

    Parameter Type Description
    idStringThe id of the legend
    graphidxNumberThe index of the graph
    graphidStringThe id of the graph
    xNumberThe x position of the graph
    yNumberThe y position of the graph
    widthNumberThe width of the graph
    heightNumberThe height of the graph
    loaderObjectLoader information of the graph

    Node

    node_add

    Dispatches when the user adds a node.
    Demo

    Parameter Type Description
    graphidStringThe id of the graph object.
    idStringThe id of the ZingChart object.
    keyanyThe node's key value.
    nodeindexNumberThe index of the node.
    plotindexNumberThe index of the plot the node was added to.
    textStringThe string representation of the node value.
    valueNumberThe node value.

    node_click

    Dispatches when the user clicks a node.
    Demo

    Parameter Type Description
    evObjectThe event object, containing other possibly valuable data.
    graphidStringThe ID of the graph object.
    idStringThe ID of the ZingChart object.
    keyanyThe scale key of the node position
    nodeindexNumberThe index of the node
    textStringThe string representation of the node value.
    valueNumberThe node value.
    plotidStringThe ID of the plot object (if any).
    plotindexNumberThe index of the plot.

    node_doubleclick

    Dispatches when the user double clicks a node.
    Demo

    Parameter Type Description
    evObjectThe event object, containing other possibly valuable data.
    graphidStringThe ID of the graph object.
    idStringThe ID of the ZingChart object.
    keyanyThe scale key of the node position
    nodeindexNumberThe index of the node
    textStringThe string representation of the node value.
    valueNumberThe node value.
    plotidStringThe ID of the plot object (if any).
    plotindexNumberThe index of the plot.

    node_mousedown

    Dispatches when the user mouses down on a node
    Demo

    Parameter Type Description
    evObjectThe event object, containing other possibly valuable data.
    graphidStringThe ID of the graph object.
    idStringThe ID of the ZingChart object.
    keyanyThe scale key of the node position
    nodeindexNumberThe index of the node
    textStringThe string representation of the node value.
    valueNumberThe node value.
    plotidStringThe ID of the plot object (if any).
    plotindexNumberThe index of the plot.

    node_mouseout

    Dispatches when the user moves out from a node.
    Demo

    Parameter Type Description
    evObjectThe event object, containing other possibly valuable data.
    graphidStringThe ID of the graph object.
    idStringThe ID of the ZingChart object.
    keyanyThe scale key of the node position
    nodeindexNumberThe index of the node
    textStringThe string representation of the node value.
    valueNumberThe node value.
    plotidStringThe ID of the plot object (if any).
    plotindexNumberThe index of the plot.

    node_mouseover

    Dispatches when the user places the mouse over a node.
    Demo

    Parameter Type Description
    evObjectThe event object, containing other possibly valuable data.
    graphidStringThe ID of the graph object.
    idStringThe ID of the ZingChart object.
    keyanyThe scale key of the node position
    nodeindexNumberThe index of the node
    textStringThe string representation of the node value.
    valueNumberThe node value.
    plotidStringThe ID of the plot object (if any).
    plotindexNumberThe index of the plot.

    node_mouseup

    Dispatches when the user mouses up on a node.
    Demo

    Parameter Type Description
    evObjectThe event object, containing other possibly valuable data.
    graphidStringThe ID of the graph object.
    idStringThe ID of the ZingChart object.
    keyanyThe scale key of the node position
    nodeindexNumberThe index of the node
    textStringThe string representation of the node value.
    valueNumberThe node value.
    plotidStringThe ID of the plot object (if any).
    plotindexNumberThe index of the plot.

    node_remove

    Dispatches when the user removes a node.
    Demo

    Parameter Type Description
    graphidStringThe id of the graph object.
    idStringThe id of the ZingChart object.
    keyanyThe node's key value.
    nodeindexNumberThe index of the node.
    plotindexNumberThe index of the plot the node was added to.
    textStringThe string representation of the node value.
    valueNumberThe node value.

    node_set

    Dispatches when the user sets a node using the setnodevalue API call.
    Demo

    Parameter Type Description
    idStringThe id of the ZingChart object.
    graphidStringThe id of the graph object.
    plotindexNumberThe index of the plot the node was set on.
    nodeindexNumberThe index of the node.
    keyanyThe node's key value.
    valueNumberThe node value.
    textStringThe string representation of the node value.

    Plot

    plot_add

    Dispatches when a plot is added to the graph.
    Demo

    Parameter Type Description
    dataObjectThe new plot data
    plotindexNumberThe index of the new plot
    graphidStringThe id of the graph object containing the plot
    idStringThe id of the ZingChart object.

    plot_click

    Dispatches when the user clicks a plot.
    Demo

    Parameter Type Description
    evObjectThe event object, containing other possibly valuable data.
    graphidStringThe ID of the graph object.
    idStringThe ID of the ZingChart object.
    plotidStringThe ID of the plot object (if any).
    plotindexNumberThe index of the plot.
    plottextStringThe text of the plot.

    plot_doubleclick

    Dispatches when the user double clicks a plot.
    Demo

    Parameter Type Description
    evObjectThe event object, containing other possibly valuable data.
    graphidStringThe ID of the graph object.
    idStringThe ID of the ZingChart object.
    plotidStringThe ID of the plot object (if any).
    plotindexNumberThe index of the plot.

    plot_modify

    Dispatches when a plot is modified.
    Demo

    Parameter Type Description
    dataObjectThe new configuration data
    graphidStringThe id of the graph object
    idStringThe id of the ZingChart object.
    plotindexNumberThe index of the modified plot.

    plot_mouseout

    Dispatches when the user moves out from a plot.
    Introduced in: vundefined
    Demo

    Parameter Type Description
    evObjectThe event object, containing other possibly valuable data.
    graphidStringThe ID of the graph object.
    idStringThe ID of the ZingChart object.
    plotidStringThe ID of the plot object (if any).
    plotindexNumberThe index of the plot.

    plot_mouseup

    Dispatches when the user mouses up on a plot
    Demo

    Parameter Type Description
    evObjectThe event object, containing other possibly valuable data.
    graphidStringThe ID of the graph object.
    idStringThe ID of the ZingChart object.
    plotidStringThe ID of the plot object (if any).
    plotindexNumberThe index of the plot.

    plot_remove

    Dispatches when a plot is removed from the graph.
    Demo

    Parameter Type Description
    plotindexNumberThe index of the removed plot
    graphidStringThe id of the graph object containing the plot
    idStringThe id of the ZingChart object.

    Refresh

    feed_clear

    Dispatches when the feed is cleared.
    Introduced in: v1.18.0
    Demo

    Parameter Type Description
    idStringThe id of the ZingChart object.
    graphidxNumberThe graph index.
    graphidStringThe id of the graph.
    xNumberThe x position of the graph.
    yNumberThe y position of the graph.
    widthNumberThe width of the graph.
    heightNumberThe height of the graph.
    loaderObjectAdditional graph loader information

    feed_interval_modify

    Dispatches when the feed interval is modified.
    Introduced in: v2.1.0
    Demo

    Parameter Type Description
    idStringThe id of the ZingChart object.
    graphidxNumberThe graph index.
    graphidStringThe id of the graph.
    xNumberThe x position of the graph.
    yNumberThe y position of the graph.
    widthNumberThe width of the graph.
    heightNumberThe height of the graph.
    loaderObjectAdditional graph loader information
    intervalNumberThe new feed interval.

    feed_start

    Dispatches when the feed starts.
    Introduced in: v2.1.0
    Demo

    Parameter Type Description
    idStringThe id of the ZingChart object.
    graphidxNumberThe graph index.
    graphidStringThe id of the graph.
    xNumberThe x position of the graph.
    yNumberThe y position of the graph.
    widthNumberThe width of the graph.
    heightNumberThe height of the graph.
    loaderObjectAdditional graph loader information

    feed_step

    Dispatches on every step of the feed.
    Demo

    Parameter Type Description
    idStringThe id of the ZingChart object.
    graphidxNumberThe graph index.
    graphidStringThe id of the graph.
    xNumberThe x position of the graph.
    yNumberThe y position of the graph.
    widthNumberThe width of the graph.
    heightNumberThe height of the graph.
    loaderObjectAdditional graph loader information

    feed_stop

    Dispatches when the feed stops.
    Introduced in: v2.1.0
    Demo

    Parameter Type Description
    idStringThe id of the ZingChart object.
    graphidxNumberThe graph index.
    graphidStringThe id of the graph.
    xNumberThe x position of the graph.
    yNumberThe y position of the graph.
    widthNumberThe width of the graph.
    heightNumberThe height of the graph.
    loaderObjectAdditional graph loader information

    Selection

    zingchart.plugins.selection-tool.beforeselection

    Fires before the selection is made
    Introduced in: v2.5.0
    Demo

    Parameter Type Description
    evObjectThe mouse event
    graphidStringThe id of the graph
    idStringThe id of the ZingChart object
    nodesArray.<any>The selected node objects
    plotareaBooleanSpecifies whether the selection was performed inside plotarea.
    selectionArray.<any>The selected node indices by plot
    touchBooleanSpecifies 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
    evObjectThe mouse event
    graphidStringThe id of the graph
    idStringThe id of the ZingChart object
    polyArray.<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
    evObjectThe mouse event
    graphidStringThe id of the graph
    idStringThe id of the ZingChart object
    nodesArray.<any>The selected node objects
    plotareaBooleanSpecifies whether the selection was performed inside plotarea.
    selectionArray.<any>The selected node indices by plot
    touchBooleanSpecifies whether the environment is touch based.

    Shape

    shape_click

    Dispatches when the user clicks on a shape.
    Demo

    Parameter Type Description
    evObjectThe event object, containing other possibly valuable data.
    graphidStringThe ID of the graph object.
    idStringThe ID of the ZingChart object.
    shapeidStringThe id of the shape (if any).
    shapeindexNumberThe index of the shape in the shapes collection.

    shape_dblclick

    Dispatches when the user double clicks on a shape.
    Demo

    Parameter Type Description
    evObjectThe event object, containing other possibly valuable data.
    graphidStringThe ID of the graph object.
    idStringThe ID of the ZingChart object.
    shapeidStringThe id of the shape (if any).
    shapeindexNumberThe index of the shape in the shapes collection.

    shape_mousedown

    Dispatches when the user clicks down on a shape.
    Demo

    Parameter Type Description
    evObjectThe event object, containing other possibly valuable data.
    graphidStringThe ID of the graph object.
    idStringThe ID of the ZingChart object.
    shapeidStringThe id of the shape (if any).
    shapeindexNumberThe 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
    idStringThe id of the ZingChart object.

    about_show

    Dispatches when the About Screen is displayed.
    Introduced in: v2.1.0
    Demo

    Parameter Type Description
    idStringThe 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
    idStringThe id of the ZingChart object.
    graphidStringThe id of the graph object.
    evObjectThe event.

    shape_mousemove

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

    Parameter Type Description
    evObjectThe event object, containing other possibly valuable data.
    graphidStringThe ID of the graph object.
    idStringThe ID of the ZingChart object.
    shapeidStringThe id of the shape (if any).
    shapeindexNumberThe 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
    evObjectThe event object, containing other possibly valuable data.
    graphidStringThe ID of the graph object.
    idStringThe ID of the ZingChart object.
    shapeidStringThe id of the shape (if any).
    shapeindexNumberThe index of the shape in the shapes collection.

    shape_mouseover

    Dispatches when the user mouses over on a shape.
    Demo

    Parameter Type Description
    evObjectThe event object, containing other possibly valuable data.
    graphidStringThe ID of the graph object.
    idStringThe ID of the ZingChart object.
    shapeidStringThe id of the shape (if any).
    shapeindexNumberThe index of the shape in the shapes collection.

    shape_mouseup

    Dispatches when the user clicks up on a shape.
    Demo

    Parameter Type Description
    evObjectThe event object, containing other possibly valuable data.
    graphidStringThe ID of the graph object.
    idStringThe ID of the ZingChart object.
    shapeidStringThe id of the shape (if any).
    shapeindexNumberThe 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
    idStringThe id of the ZingChart object.
    heightNumberThe height of the ZingChart object.
    outputStringThe render output of the zingchart object; one of: "svg", "canvas", "vml"
    widthNumberThe width of the ZingChart object.

    source_show

    Dispatches when the source is displayed.
    Introduced in: v2.1.0
    Demo

    Parameter Type Description
    idStringThe id of the ZingChart object.
    heightNumberThe height of the ZingChart object.
    outputStringThe render output of the zingchart object; one of: "svg", "canvas", "vml"
    widthNumberThe width of the ZingChart object.

    Zoom

    maps.zoom

    Dispatches when a map is zoomed in/out on.

    Parameter Type Description
    bboxObjectBounding box of the graph
    graphinfoObjectThe chart JSON
    groupsArrayAny set map groups
    heightNumberHeight of the chart
    idStringID of the map
    ignoreArrayAny set ignored regions
    itemsArrayMap items
    loaderidStringThe id of the chart element
    offsetXNumberPanning offset in the x direction
    offsetYNumberPanning offset in the y direction
    panningBooleanWhether panning is enabled
    scrollingBooleanWhether scrolling is enabled
    widthNumberWidth of the chart
    xNumberX position
    yNumberY position
    zoomNumberThe zoom level
    zoomingNumberWhether zooming is enabled

    postzoom

    Dispatches after a zoom event is completed.
    Demo

    Parameter Type Description
    graphidStringThe ID of the graph object.
    idStringThe ID of the ZingChart object.
    actionStringThe type of zoom action: "zoomin", "zoomout", or "viewall"
    kmaxNumberSpecifies the key scale value corresponding to the end position on x axis.
    kminNumberSpecifies the key scale value corresponding to the start position on x axis.
    xmaxNumberSpecifies the end position on x axis.
    xminNumberSpecifies the start position on x axis.
    ymaxNumberSpecifies the end position on y axis.
    yminNumberSpecifies the start position on y axis.
    zoomxBooleanSpecifies if the zoom was performed on x axis.
    zoomyBooleanSpecifies if the zoom was performed on y axis.
    xZoomedBooleanSpecifies if the x axis is zoomed at the time of the event.
    yZoomedBooleanSpecifies if the y axis is zoomed at the time of the event.

    zoom

    Dispatches when a zoom event occurs.
    Demo

    Parameter Type Description
    graphidStringThe ID of the graph object.
    idStringThe ID of the ZingChart object.
    actionStringThe type of zoom action: "zoomin", "zoomout", or "viewall"
    kmaxNumberSpecifies the key scale value corresponding to the end position on x axis.
    kminNumberSpecifies the key scale value corresponding to the start position on x axis.
    xmaxNumberSpecifies the end position on x axis.
    xminNumberSpecifies the start position on x axis.
    ymaxNumberSpecifies the end position on y axis.
    yminNumberSpecifies the start position on y axis.
    zoomxBooleanSpecifies if the zoom was performed on x axis.
    zoomyBooleanSpecifies if the zoom was performed on y axis.
    xZoomedBooleanSpecifies if the x axis is zoomed at the time of the event.
    yZoomedBooleanSpecifies if the y axis is zoomed at the time of the event.