chartjs / chartjs/chartjs-plugin-zoom
Question: why does getZoomLevel() always return 1 when min & max are set for the X scale?
Open
bug
- Dominant language
- JavaScript
- Stars
- 623
- Forks
- 331
- Avg merge
- 7h 5m
- Merged PRs (30d)
- 7
Description
So if I implicitly set an X scale with the following:
```
x: {
min: 20,
max: 100,
...
}
```
and then call `chart.getZoomLevel()` in an `onZoom()` callback function, the zoom level is always 1. If I omit the initial min & max from the X scale, the zoom level changes correctly as I zoom in and out. Why is this and is there some way I could get the correct zoom level while still setting the initial min and max values for the X scale?
Hope that makes sense!
Contributor guide
Assessment
This issue has not been assessed yet.