chartjs / chartjs/chartjs-plugin-zoom

Add animations to zooming and panning

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

Description

On my chart I added buttons to zoom and pan.
For example the zoom in call looks like this:
`this.chartTicketHistory.zoom(1.1);`
and the call to pan to the left looks like this
`this.chartTicketHistory.pan(10, [this.chartTicketHistory.scales["x"]]);`

What I want is to add animtions to this functionality. Basically instead of just jumping 10 pixels to the left I want the chart to transition 10px to the left. How can I do that?

Also what is kind of weird is that the `resetZoom()` method is animated by default. So my zooming in, out, panning left and right dont use transitions but when I call `resetZoom()` the chart transitions back to its default state.
Note that I dont have any animations or transitions configured in my chart options.

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.