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
-
You can attach a single value to the token that will be available for **all** nodes
-
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 yourdata-
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'