You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using the Tooltip Callbacks, there exists data to tie the datapoint to the Chart Data.
When using the Custom Tooltip Callback, there does not exist data to tie the datapoint to the Chart Data such as the datasetIndex. So, there is very little data to use to create a custom tooltip and in fact much less than using the Tooltip Callbacks.
It would be great if the tooltip argument passed to the Custom Tooltip Callback included the datasetIndex and other information included in the Tooltip Callbacks arguments. It would also be great if the Chart data could be passed.
For example, I can attach some data to my data point in my dataset like so:
dataset.data.push({ x:xPoint, y:yPoint, pointData: someObject });
Then when I use a Tooltip Callack like for "title," then that pointData is passed with the rest of the data to my callback function.
The text was updated successfully, but these errors were encountered:
The data and tooltipItems could be attached to the model or passed to the custom function some other way. If attached to the model the property names would need to start with an '_' otherwise they will be changed during transition to view. I personally favour just passing these properties to the custom function.
Using Version 2.1.6 with a Linear X-Axis
When using the Tooltip Callbacks, there exists data to tie the datapoint to the Chart Data.
When using the Custom Tooltip Callback, there does not exist data to tie the datapoint to the Chart Data such as the datasetIndex. So, there is very little data to use to create a custom tooltip and in fact much less than using the Tooltip Callbacks.
It would be great if the tooltip argument passed to the Custom Tooltip Callback included the datasetIndex and other information included in the Tooltip Callbacks arguments. It would also be great if the Chart data could be passed.
For example, I can attach some data to my data point in my dataset like so:
dataset.data.push({ x:xPoint, y:yPoint, pointData: someObject });
Then when I use a Tooltip Callack like for "title," then that pointData is passed with the rest of the data to my callback function.
The text was updated successfully, but these errors were encountered: