chartjs / chartjs/chartjs-plugin-zoom

Zooming in over axis does not reset y-axis ticks back to initial limits

Open
#798 1 comment 0 reactions 0 assignees View on GitHub
bug
Dominant language
JavaScript
Stars
623
Forks
331
Avg merge
7h 5m
Merged PRs (30d)
7

Description

### Current behavior
Ticks are not reset while zooming in/out over the axis. See "Optional extra steps/info to reproduce" for a better understanding.
![img__1](https://github.com/chartjs/chartjs-plugin-zoom/assets/24796354/5a4b7f80-48a2-43b2-814b-420fd7564acc)
![img__2](https://github.com/chartjs/chartjs-plugin-zoom/assets/24796354/0108c718-3771-4d11-9bfb-d3817e155cdd)

### Optional extra steps/info to reproduce
Use the codepen mentioned below.
1) Zoom in with the cursor over "2022-09" on the x-axis until the ticks on the y-axis change.
2) Put the cursor on the y-axis and zoom in, it does not matter how much.
3) Put the cursor over the x-axis and zoom out completely.
4) Put the cursor over the y-axis and try to zoom out as much as possible.
-> It's not possible to zoom out over the y-axis until you get the initally set ticks.

### Expected behavior
It is possible to zoom out until you get the initially set ticks.

### Reproducible sample
See this [codepen](https://codepen.io/Yawgmoth1806/pen/ExrbmGM).

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.