chartjs / chartjs-plugin-zoom

Zoom and pan plugin for Chart.js
MIT License
579 stars 322 forks source link

Panning is removing ticks to the left #765

Open rsd opened 1 year ago

rsd commented 1 year ago

When panning a chart, some ticks to the left (and the x grids) are gone. Dragging back and forth a chart, it will redraw the x ticks/grids when they are in about 40% of the chart.

This is also happening in the samples here: https://www.chartjs.org/chartjs-plugin-zoom/latest/samples/pan-region.html and here: https://www.chartjs.org/chartjs-plugin-zoom/latest/samples/basic.html

To reproduce just click and drag (pan) these charts and observe the x ticks to the left.

E.g. Before pan:

image

After pan:

image

Tested on Chrome 113.0.5672.127.

If this is the expected behavior, please point me on how to avoid this.

-rsd