Replies: 1 comment 5 replies
-
So for further details I've got zoom plugin version 1.0.1 and it seems that the plugin is being shared across charts rather than being an instance for each chart. How do I ensure that each chart gets its own copy of the plugin so it's not sharing variables? |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm having trouble with resetting zoom on a page with multiple charts. I have two charts created using new Chart() calls so they're each getting a unique ID. Because the charts are related I just wanted to have one button on the page that resets the zoom for both charts.
Clicking the button calls the two charts in order:
window.chart1.resetZoom();
window.chart2.resetZoom();
If I zoom in on the data in chart1 and leave chart2 normal then click the reset button, chart1 resets properly. But if I zoom in on chart2 leaving chart1 alone and click the button, chart1 zooms in to the same scale as chart2 and neither chart resets.
I'm not sure how to get around this problem because it's not obvious what charts are zoomed in or not.
Beta Was this translation helpful? Give feedback.
All reactions