webpig
Posts: 15
Joined: Tue Jul 13, 2021 3:00 am

click tooltip will change selected point

I set pointerEvents to auto, console.log is not work. But click tooltip will change current select point. I hope click tooltip, nothing will happen.
pawelys
Posts: 962
Joined: Wed Sep 02, 2020 10:37 am

Re: click tooltip will change selected point

Hi! Thanks for contacting us with your question! I don't really understand what is your goal here. Could you provide the demo in online editor? You can start here: https://jsfiddle.net/BlackLabel/9b1p5vkn/

And tell me exact reproduction steps, and try to describe your goal better. Kind regards
Paweł Lysy
Highcharts Developer
webpig
Posts: 15
Joined: Tue Jul 13, 2021 3:00 am

Re: click tooltip will change selected point

demo: https://jsfiddle.net/webpig/g8zntoax/6/
When I click tooltip, if point under tooltip, tooltip's content will change. Showing that point 's info.
I Want to click tooltip, nothing happen.
My program is running on the phone.
image: https://ibb.co/nCyrkRQ
webpig
Posts: 15
Joined: Tue Jul 13, 2021 3:00 am

Re: click tooltip will change selected point

pawelys wrote: Wed Jul 14, 2021 7:08 am Hi! Thanks for contacting us with your question! I don't really understand what is your goal here. Could you provide the demo in online editor? You can start here: https://jsfiddle.net/BlackLabel/9b1p5vkn/

And tell me exact reproduction steps, and try to describe your goal better. Kind regards
Now I want to achieve scrollable tooltip. But on phone, scoll will trigger mouseover and click event. Tooltip will change.
pawelys
Posts: 962
Joined: Wed Sep 02, 2020 10:37 am

Re: click tooltip will change selected point

Hi Again! Regarding the first message, you've got the typo: poiterEvents -> pointerEvents.
Apart from that, you check this demo, and let me know if that works for you! https://jsfiddle.net/BlackLabel/39w2qhzk/

Regarding the second part, the scrollable tooltip isn't part of our official api, but you can style the tooltip using css. Check the following topic: viewtopic.php?t=37599

And let me know if the solutions displayed in this topic resolves your issue! Kind regards,
Paweł Lysy
Highcharts Developer
webpig
Posts: 15
Joined: Tue Jul 13, 2021 3:00 am

Re: click tooltip will change selected point

pawelys wrote: Thu Jul 15, 2021 7:08 am Hi Again! Regarding the first message, you've got the typo: poiterEvents -> pointerEvents.
Apart from that, you check this demo, and let me know if that works for you! https://jsfiddle.net/BlackLabel/39w2qhzk/

Regarding the second part, the scrollable tooltip isn't part of our official api, but you can style the tooltip using css. Check the following topic: viewtopic.php?t=37599

And let me know if the solutions displayed in this topic resolves your issue! Kind regards,
I try to that way in your link. Show the image:

First I operate: https://ibb.co/dbfnxWr

after: https://ibb.co/ZXBZKpX

click tooltip, if point under tooltip, tooltip will change. Tooltip showing that point's info. Now, I can't achieve tooltip with scroll in mobile perferctly.
pawelys
Posts: 962
Joined: Wed Sep 02, 2020 10:37 am

Re: click tooltip will change selected point

As I've seen, you reached out to every support channel available. Please, keep the messages to only one support channel, since we are all working together.
Apart from that, I don't know, what console log you mean. There is no console log in your code, that you shared.
Apart from that also, this is exactly what pointerEvent: auto does. Just as @Khlieng wrote on github: https://jsfiddle.net/gkctLfo1/

What scroll do you mean? Please, try to explain your goal more toroughly. Kind regards,
Paweł Lysy
Highcharts Developer
webpig
Posts: 15
Joined: Tue Jul 13, 2021 3:00 am

Re: click tooltip will change selected point

pawelys wrote: Fri Jul 16, 2021 8:26 am As I've seen, you reached out to every support channel available. Please, keep the messages to only one support channel, since we are all working together.
Apart from that, I don't know, what console log you mean. There is no console log in your code, that you shared.
Apart from that also, this is exactly what pointerEvent: auto does. Just as @Khlieng wrote on github: https://jsfiddle.net/gkctLfo1/

What scroll do you mean? Please, try to explain your goal more toroughly. Kind regards,
You can see last quote. I give two image link, you can click. Second image is after click tooltip.
I click a point, tooltip is show, and showing current point's info, this is true. But if other point under tooltip, When I click tooltip, tooltip will show other point's info. So I want to scroll the tooltip, I will trigger tooltip click's event. My program run in phone. My description may be unclear. My English is not good! Sorry.
pawelys
Posts: 962
Joined: Wed Sep 02, 2020 10:37 am

Re: click tooltip will change selected point

hi! You don't need to click any point, to display tooltip, so i am a bit confused. Do you want the tooltip to be displayed only when you click on the point? Kind regards
Paweł Lysy
Highcharts Developer
webpig
Posts: 15
Joined: Tue Jul 13, 2021 3:00 am

Re: click tooltip will change selected point

pawelys wrote: Thu Jul 22, 2021 8:41 am hi! You don't need to click any point, to display tooltip, so i am a bit confused. Do you want the tooltip to be displayed only when you click on the point? Kind regards
Yes, if I click tooltip, tooltip should not refresh. How I know tooltip is clicked? I tried this way. PC is work, but it's not work on mobile.

Code: Select all

(function (H) {
    H.wrap(H.Tooltip.prototype, 'refresh', function (proceed, point, e) {
        console.log(point, e)
        let isClickTooltip = false;
        e && e.path && e.path.forEach(item => {
            const classList = item.classList;
            if (classList && classList.length) {
                if (Array.from(classList).includes('highcharts-tooltip')) {
                    isClickTooltip = true;
                }
            }
        });
        if (!isClickTooltip) {
            proceed.call(this, point, e);
        }
    });
}(Highcharts));
I tried to above. But event only has a few property on moblie, example: chartX, chartY. So it is not work on mobile.
dominik.c
Posts: 2081
Joined: Fri Aug 07, 2020 7:07 am

Re: click tooltip will change selected point

Hello webpig!

Unfortunately, my colleague is currently not available so I'll take care of your topic.

I took a quick look at your posts and I'm not sure what you would like to achieve. Neither the tooltip nor any element of the chart will change after clicking the tooltip. Could you point out what is the issue in your demo and fill the gaps below? :)

What does not work -
How you think it should work -

Best regards!
Dominik Chudy
Highcharts Developer
webpig
Posts: 15
Joined: Tue Jul 13, 2021 3:00 am

Re: click tooltip will change selected point

dominik.c wrote: Mon Jul 26, 2021 12:09 pm Hello webpig!

Unfortunately, my colleague is currently not available so I'll take care of your topic.

I took a quick look at your posts and I'm not sure what you would like to achieve. Neither the tooltip nor any element of the chart will change after clicking the tooltip. Could you point out what is the issue in your demo and fill the gaps below? :)

What does not work -
How you think it should work -

Best regards!
I want to prevent tooltip's refresh event on mobile.
dominik.c
Posts: 2081
Joined: Fri Aug 07, 2020 7:07 am

Re: click tooltip will change selected point

Hi again!

I see that you've created two topics about the same thing. Let's discuss this problem in one topic. For the future please do not create such duplicates. In this thread, we will continue our conversation: viewtopic.php?f=9&t=46968&p=168986#p168986

Best regards!
Dominik Chudy
Highcharts Developer

Return to “Highcharts Usage”