vileen
Posts: 1
Joined: Wed Jan 05, 2022 4:11 pm

Two different tooltips

Hi, is there a way to have two different sets of tooltips? One to be triggered on click, the other on hover.
I'm working on a map chart, triggering a detailed information on country click, but I would also like to display just the country name on hover.
I tried the approach of defining 2 tooltip config options and calling:

Code: Select all

chart.update({tooltip: oneOfTwoSetsOfOptions});
but the update function mutates the object instead of replacing the contents.
magdalena
Posts: 517
Joined: Tue Aug 24, 2021 1:32 pm

Re: Two different tooltips

HI,

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

You can achieve this using point mouseOver, click, mouseOut events and chart.update() method.

API Reference:
https://api.highcharts.com/highmaps/ser ... int.events
https://api.highcharts.com/class-refere ... art#update

Example demo:
https://jsfiddle.net/BlackLabel/vqyb2mut/

Let me know if you have any further questions,
Regards!
Magdalena Gut
Developer and Highcharts Support Engineer

Return to “Highcharts Usage”