ZingChart: Sending Custom Data with node_click

Overview

We have custom data- tokens that allow you to attach meta data to the chart. These custom "data dash" tokens work in two ways

  1. You can attach a single value to the token that will be available for **all** nodes

  2. You can attach an array of values that is a one-to-one map in length to your values  array. Each node value will correspond to the same index in your data-  array.

Working Example

Event node_click   can send custom data but it sends ONLY the custom data associated with that node.

So, for example, if you have

values: [35, 42, 33, 49, 35, 47, 35],
dataSingleValue: 'Global Value Dos',
// same length at values array
dataMultipleValues: ['A', 'B','C','D', 'E','F','G'],

plot_click  will provide:

xdata : { dataMultipleValues : ['A', 'B','C','D', 'E','F','G'] }

and node_click   will provide (for example clicking on the 2nd node)

dataMultipleValues : 'B'
  1. Token List: https://www.zingchart.com/docs/tutorials/elements/tokens#tokens-list

  2. Demo: https://app.zingsoft.com/demos/embed/GQ1V0BGA

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us