Ngx-charts: Disabling animations

Created on 14 Jun 2017  路  9Comments  路  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

Current behavior
There is no documented way of disabling transition-in animations.

Expected behavior
It will be very helpful specially on a mobile page with multiple charts to have only the visible chart to the users eye animating smoothly by disabling the rest of animations. Currently no where in the documents there is a mention of a way of disabling animation for a particular component instance

What is the motivation / use case for changing the behavior?
Mobile performance boost

Most helpful comment

We get several dozen requestAnimationFrame violations outside of Prod Mode, but 3 rather large ones in AoT Mode amounting to over 1.3 seconds.

[Violation] 'requestAnimationFrame' handler took 404ms
[Violation] 'requestAnimationFrame' handler took 253ms
[Violation] 'requestAnimationFrame' handler took 705ms
  • 6 barcharts (2 above the fold)
  • 10-15 data points per chart
  • Angular 4.1.3
  • ngx-chart 5.3.1

We're noticing rather janky experience for several seconds while the charts initialize and animate values - very pronounced on mobile. It would be nice to disable animations in mobile or a config to disable them altogether. Any plans for this?

All 9 comments

+1

We get several dozen requestAnimationFrame violations outside of Prod Mode, but 3 rather large ones in AoT Mode amounting to over 1.3 seconds.

[Violation] 'requestAnimationFrame' handler took 404ms
[Violation] 'requestAnimationFrame' handler took 253ms
[Violation] 'requestAnimationFrame' handler took 705ms
  • 6 barcharts (2 above the fold)
  • 10-15 data points per chart
  • Angular 4.1.3
  • ngx-chart 5.3.1

We're noticing rather janky experience for several seconds while the charts initialize and animate values - very pronounced on mobile. It would be nice to disable animations in mobile or a config to disable them altogether. Any plans for this?

+1

+1

+1

+1

+1

+1

@fancycoder Did you find any workaround for this?

Was this page helpful?
0 / 5 - 0 ratings