Programmatic zoom and pan chartjs with logarithmic scale

👍:1

For zooming and panning, I’m using Zoom plugin: https://github.com/chartjs/chartjs-plugin-zoom

You can also find a specific sample on log axis: https://www.chartjs.org/chartjs-plugin-zoom/latest/samples/wheel/log.html

👍:0

For anyone with a similar problem, I’ve got it working …

I simply need to call the pan function like this:

mychart.pan(10, [mychart.scales[‘yMyScale’]], ‘none’);

Leave a comment