Does the Chart.js zoom plugin preserve the original axis step size when zooming a single axis?
0 reputation · 26 Feb 2026, 01:17 UTC
When integrating the chartjs-plugin-zoom into a line chart, I configure the zoom object to enable wheel zooming on the Y‑axis only (zoom: { zoom: { wheel: { enabled: true }, mode: 'y' }}). The plugin updates the scale’s min and max values to create the visual zoom effect, but it is unclear whether it also recalculates the scale’s step size (tick interval) to keep the original data‑point spacing or leaves the step size unchanged, which could affect label rendering and tooltip alignment.
Goal: Determine if the zoom plugin automatically adjusts the axis step size when zooming a single axis, or if the step size remains as originally set, requiring manual configuration to maintain consistent tick spacing.
- Does the zoom plugin modify the Y‑axis step size when the zoom mode is set to 'y'?
- If it does not adjust the step size, what configuration options are available to preserve the original tick interval after zooming?
- How does this behavior differ when zooming both axes versus a single axis?