kusingh
Posts: 2
Joined: Tue Nov 23, 2021 8:31 am

Combine Mouse over and Click for tooltip

I have an use case where I need to show tooltip on click for specific points and for rest of the points on mouse over as default.
Here is my series data:

Code: Select all

{
            name: "Chicago Store",
            color: "#3d806a",
            data: [
                500,
                460,
                {
                    value: 520,
                    marker: {
                        icon: "Alert",
                    }
                },
                480,
                350,
                380,
                500,
                500
            ],
        }
        
In the series if there is marker key in the data then I create there custom marker and on this custom marker I need to show tooltip on click. And on the rest of the points need to show tooltip on mouse over.

Here is the view of the chart:
Image

Thanks in advance!
mateusz.b
Posts: 2006
Joined: Tue Jul 13, 2021 11:34 am

Re: Combine Mouse over and Click for tooltip

Hello kusingh,

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

I need to make sure about one thing. When hovering over special points should the tooltip be visible too? And then stay visible after the point was clicked? Or the tooltip should appear only after point click. Also how would you like to hide that tooltip? On mouse out or after the point is clicked second time? For normal points I assume that default behaviour is fine.

Regards!
Mateusz Bernacik
Highcharts Developer
kusingh
Posts: 2
Joined: Tue Nov 23, 2021 8:31 am

Re: Combine Mouse over and Click for tooltip

Hello mateusz.b,

On hovering over the special point the tooltip will not be visible, it only visible when that point will be clicked and hide on mouse out event. For other points the tooltip will be shown on hover.

Thanks,
mateusz.b
Posts: 2006
Joined: Tue Jul 13, 2021 11:34 am

Re: Combine Mouse over and Click for tooltip

kusingh,

Thanks for clarification, I will get back to you with solution asap.

Regards!
Mateusz Bernacik
Highcharts Developer

Return to “Highcharts Usage”