chartjs / chartjs/chartjs-plugin-zoom

While the graph updates the live data the resetZoom() does not happen correctly

Open
#918 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
623
Forks
331
Avg merge
7h 5m
Merged PRs (30d)
7

Description

While the graph updates the live data the reset does not happen correctly in a graph made like this (sorry if it is too skimpy). You know what it is if you have done it.
The example is unfortunately too big to be reported here on github.
It is a financial chart with added volumes.
Two series, one volume and one interchangeable line/candlestick/ohlc.

The zoom when reset remains set to the last zoomed size.

I don't know if you can fake it, but if you can you will realize that the problem exists and it is quite annoying.

```
zoom: { //plugin
zoom: {
wheel: {
enabled: true,
},
pinch: {
enabled: true
},
mode: 'x',
limits: {
x: {min: 0, max: 100},
},
onZoomStart: ({ chart, event, point }) => {
drawOnChartZoomButton();
},
},
},
....





resetZoomBtn = (chart) => {
chart.resetZoom()
};

🧐

```

If you need further details just ask.

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.