Skip to content

Add slide in/out animation #10251

Description

@msteiger

Feature Proposal

I have a long list of data sets with identical x/y axes. The sets can be iterated through using "prev/next" buttons and the chart view will replace the content and update instantly. To make it look more natural, I want to slide the data in/out to the left and right.

Today, chartjs. supports transition animations of the values from (0..x) which looks like a bit like unfolding/zooming in. What I want is a transition from (x-chartWidth..x), ie. all data points move with the same speed to their final position.

Possible Implementation

I started hacking a workaround solution based on the rendering context's translate() operation in draw() and updating the translation offset in an animation callback handler, but the callback didn't get enough information, eg. the animation type is missing.

Afaics, it needs to be implemented in chart.js and can't go in a plugin, but I might be wrong. I could try implementing it myself, if you agree to accept this, but I would need some help, e.g. how to specify the config parameters.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions