Ngx-charts: Easily Disable Chart Animations

Created on 15 Feb 2017  路  11Comments  路  Source: swimlane/ngx-charts

I'm submitting a ... (check one with "x")

[ ] bug report => search github for a similar issue or PR before submitting
[x] feature request
[ ] support request => Please do not submit support request here

What is the motivation / use case for changing the behavior?
It would be very useful to have a quick-option to turn animations on/off -- mostly for the sake of performance.

[animation] = "animation"

//options
animation =  false;

This would help in situations where performance may be a concern, or if a chart is being used multiple times on the same view/page. For example, I am using a normalized horizontal bar chart in a table column/cell (one per row) to represent percentages of the relevant data, and 25 rows of them animating at the same time is bit much. I realize this may be a unique use-case; however, turning animations off may, in some cases, be just as important as their glamour.

If there is already an easy way to turn animations off, it is not currently documented.

:)

Enhancement Accept PRs New Feature Backlog Med

Most helpful comment

This is a valid feature request. We are waiting for the new animation features to land in angular so we can improve our animations. I agree there should be an option to disable them.

All 11 comments

This is a valid feature request. We are waiting for the new animation features to land in angular so we can improve our animations. I agree there should be an option to disable them.

I'd also like to see a way to disable the data-point behaviours in the Angular 2 branch, if that's feasible.

Attached shows attempted use of gauge. If animation cannot be disabled that pretty much makes e.g. the gauge unusable, as on every update the gauge redraws from position 0. Even a quick hack to disable animations might allow us to proceed w/ ngx-charts, please advise
may-17-2017 21-36-36
.

I could use this change as well. Here's an updated Plnkr of the demo to show what @brent-williams was describing.

https://plnkr.co/edit/hlpsjrRfjd1wNdeWDSpk?p=preview

Any updates on this?

This really desperately needs a solution... The gauge element is unusable with updating values.

Is there a fix in the works for this?

Any updates on this?

The gauge animation issue is addressed by https://github.com/swimlane/ngx-charts/pull/563

I am working on adding animations input to the charts that would disable the animations for the component.

animations input landed in 6.1.0

image
Hi, After disable the animation, the pie grid chart show two % , how to solve this? Thanks

Was this page helpful?
0 / 5 - 0 ratings

Related issues

DZDomi picture DZDomi  路  4Comments

Hypercubed picture Hypercubed  路  3Comments

Jacquers picture Jacquers  路  3Comments

jvbianchi picture jvbianchi  路  4Comments

kakalos12 picture kakalos12  路  4Comments