question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Zoom triggered when hiding/showing series by clicking legend

See original GitHub issue

Hi.

I have a chart with 2 or more series, drag zoom feature enabled, pan feature disabled, and chart legend enabled.

Sometimes when clicking multiple times the chart legend to show/hide one series or another, a zoom event is suddenly triggered (onZoomComplete callback is executed) and everything disappears: chart axis show ranges totally outside the data range.

Calling resetZoom() make things go back to normal.

I’m using the following configuration

{
    zoom: {
        pan: {
            enabled: false,
            mode: "xy",
        },
        zoom: {
            enabled: true,
            drag: true,
            mode: "xy",
            onZoomComplete: someFunction
        }
    }
}

Thanks in advance for any help.

Mathias

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:18 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
etimbergcommented, Apr 25, 2021

I think this is resolved in chart.js v3 and zoom plugin 1.0.0-beta.1 since the click is now limited to the chart area.

1reaction
DieCi007commented, May 26, 2021

Hi, I am currently working with chart.js v3.3 and chartjs-plugin-zoom v1.0 and experiencing this problem. A slight move on the label registers as mouse drag.

Read more comments on GitHub >

github_iconTop Results From Across the Web

ECharts: Disable default click action on legends - Stack Overflow
One workaround is to dispatch the legendSelect action in a legendselectchanged event handler to re-select the option that the user clicks.
Read more >
Creating a recurring series event - Zoom Support
Zoom Events allows you to schedule a recurring series event on specific dates and times. Hosts can schedule events with multiple occurrences ...
Read more >
Join My Meeting via Browser - Zoom Support
Enter your meeting ID provided by the host/organizer. Click Join. Click Open Zoom Meetings (PC) or Open zoom.us (Mac). You need to click...
Read more >
Enabling or disabling in-meeting chat - Zoom Support
Under In Meeting (Basic), click the Meeting chat toggle to enable or disable it. Note: If you disable Meeting chat, the Meeting chat ......
Read more >
How to use Zapier - Zoom Support
Every Zap has a trigger app, that kicks off the automation and ... you can see any events with Zapier by clicking on...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found