How do I get a crosshair tooltip to show both the value AND an associated code or data-note when they are available?

Problem:
I have a time series line chart, and I am trying to get a crosshair tooltip to show both the value AND an associated code or data-note when they are available. I am dynamically pulling data from a database and have that loaded into the series, but I can't seem to figure out how to show the 3rd or 4th data points from this Data example:

[1704090600000,9.0,"A","air exposure"],[1704089700000,9.0,"A","air exposure"],[1704088800000,7.23,null,null]
I basically need to show the explanation for when the data are 'wonky'.

Solution:

First of all, we don't have an out of the box feature to check for the code or comment out of the array and show it directly in the tool-tip. You will have to write a basic algorithm that will take the codes and comments from the multidimensional array into their separate arrays and add them back to the series entry as custom tokens i.e. "data-code" and "data-comment" that you can access in the tool-tip with e.g., %data-code or %data-comment. Please use this demo for reference. We've also attached an illustration for reference.

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