[Bug]: Line disappears when calling zoomScale() multiple times
bjorn-bakken opened this issue · 3 comments
Would you like to work on a fix?
- Check this if you would like to implement a PR, we are more than happy to help you go through the process.
Current and expected behavior
I have a simple line chart with type of x scale set to time
and two buttons to set zoom to one and two weeks respectivly for the x-axis.
When zoomScale(...)
is called multiple times, some line segments disappears (but the markers are still there). If data are more well behaved (ie. not flucuating to much) I don¨t get the same problem.
Illustrated in gif below.
Reproduction
https://codesandbox.io/p/sandbox/magical-driscoll-l3jzzw?file=%2Fpackage.json%3A1%2C1
chart.js version
v4.3.2
react-chartjs-2 version
5.2.0
Possible solution
The bug (if that is what it is) might well be in chart.js
or chartjs-plugin-zoom
. I will create a related issue with them also.
Same here.
I've downgraded chart.js version to 4.3.0, and it's working correctly on that version.
I can confirm that downgrading chart.js to 4.3.0 fixes the issue for me to. Thank you @tomas1646!
I confirm the same behavior too. I downgraded to 4.3.0 as a temporary solution