blinda
Posts: 3
Joined: Mon Apr 12, 2021 2:52 pm

Long press feature

Hello all! :D I wanted to know if there is a feature in Highcharts that allows users to only interact with the chart if they long press on the chart. Use Case for mobile example: Currently have chart implemented in a page that contains other components, as a user scrolls down, the chart's visual is being modified if the chart has been touched. Essentially, I would like the chart to not change its state unless the user long presses on the chart.
User avatar
sebastian.h
Posts: 1734
Joined: Fri Aug 07, 2020 7:08 am

Re: Long press feature

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

Directly from the API, I don't remember such functionality that works after a long press.

I suppose you are looking, some feuter to preventing clicking when scrolling, I'm right?
In this GitHub issue, you will find a possible workaround, which involves removing preventDefault() from on-click event.
https://github.com/highcharts/highchart ... -516876371

Let me know if was that you are looking.
Best regards.
Sebastian Hajdus
Highcharts Developer

Return to “Highcharts Usage”