question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[animations]="false" does not disable CSS transition

See original GitHub issue

Describe the bug We disabled the animations on a chart (ngx-charts-bar-vertical-stacked) via [animations]=“false”. We expected the chart to “pop in”, however, it still fades in. We found that there are some styles active on the “ngx-charts-outer”-div:

.ngx-charts-outer {
    -webkit-animation: chartFadeIn linear .6s;
    animation: chartFadeIn linear .6s;
}

Are these styles supposed to be active when “animations” is set to false?

Expected behavior No fading / animating behavior.

Demo https://stackblitz.com/edit/angular-ivy-qjlujv?file=src%2Fapp%2Fapp.component.ts

ngx-charts version 20.1.0

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
stanciupaulcommented, Aug 8, 2022

I noticed this problem on Angular 14 while on Angular 13 seems to be fine. Will the linked pull request also fix #1775? They look like the same issue to me.

1775 seems to have an issue with the graph lines not being rendered instantly, this issue is for the first fade in animation when the whole shape appears.

also when you re-enable a series from legend area

0reactions
kapselgcommented, Nov 23, 2022

It is very frustrating that disabling animations does not disable the fade-in animation.

EDIT: There is a temporary solution to disable fade animations for all charts. Just place this code in root CSS file of your project.

/* ngx charts bypass */
.ngx-charts-outer {
  -webkit-animation:chartFadeIn linear 0 !important;
  animation:chartFadeIn linear 0 !important;
}
Read more comments on GitHub >

github_iconTop Results From Across the Web

What is the cleanest way to disable CSS transition effects ...
Short Answer. Use this CSS: .notransition { -webkit-transition: none !important; -moz-transition: none !important; -o-transition: none ...
Read more >
prefers-reduced-motion - CSS: Cascading Style Sheets | MDN
Indicates that user has notified the system that they prefer an interface that removes or replaces the types of motion-based animation that ...
Read more >
How Cypress Freezes CSS Animations And You Can Too
Disabling animations from out test #​​ We can use jQuery bundled with Cypress under Cypress. $ to make the code simpler.
Read more >
An Interactive Guide to CSS Transitions - Josh W Comeau
Note that ease-in is pretty much exclusively useful for animations that end with the element offscreen or invisible; otherwise, the sudden stop ......
Read more >
Controlling CSS Animations and Transitions with JavaScript
The idea in this demo is to enlarge the heart and stop the animation when it is hovered over. HTML; CSS; JS. Result;...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found