You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I'm using chart.js 4.1.1 and chartjs-plugin-zoom 2.0.0.
I'm wondering if the following behavior is intended:
On my chart I have enabled zooming for the x-axis. I've configured the following inside my chart config: opions.plugins.zoom.zoom.onZoom = event => console.log("onZoom").
Whenever I'm zooming in via mouse wheel this function is invoked and "onZoom" printed to the console. But when I try to set the zoom level programmatically via myChart.zoomScale("x", {min: min, max: max}), the zoom is working but my function is not invoked.
I don't really understand if this is intended, a bug, or something I've done wrong. Is there another function for my expected outcome? Is this intended because programmatic changes to the zoom could call the desired functions themselves?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi, I'm using chart.js 4.1.1 and chartjs-plugin-zoom 2.0.0.
I'm wondering if the following behavior is intended:
On my chart I have enabled zooming for the x-axis. I've configured the following inside my chart config:
opions.plugins.zoom.zoom.onZoom = event => console.log("onZoom")
.Whenever I'm zooming in via mouse wheel this function is invoked and "onZoom" printed to the console. But when I try to set the zoom level programmatically via
myChart.zoomScale("x", {min: min, max: max})
, the zoom is working but my function is not invoked.I don't really understand if this is intended, a bug, or something I've done wrong. Is there another function for my expected outcome? Is this intended because programmatic changes to the zoom could call the desired functions themselves?
Btw, the same goes for the
onZoomStart
callback.I'd really appreciate your help, thx :)
Beta Was this translation helpful? Give feedback.
All reactions