MorganT
Posts: 1
Joined: Fri Sep 13, 2024 8:27 pm

Modify when tooltip fires on a line chart

I'm looking for how to control when a tooltip fires on a line chart. Default is between two points the tool tip flips when you get closer to second point. What we want is to display a single tool tip based on whether the next value/point is higher or lower than the previous point (you get a different tip depending upon the case). Is there any kind of property we can set for this?
andrzej.b
Posts: 131
Joined: Mon Jul 15, 2024 12:34 pm

Re: Modify when tooltip fires on a line chart

Hi Morgan,

Welcome to our forum and thanks for contacting us with your question!

If I understand you correctly, there is a way to achieve what you want with tooltip.formatter option. With it, you can define the comparison logic and control the content of the tooltip.

I've prepared for you a sample fiddle with an example implementation, feel free to adjust it as needed:https://jsfiddle.net/BlackLabel/71cdgfj2/

Let me know if that is what you were looking for!

Best regards,
Andrzej

Return to “Highcharts Usage”