Turn of Chart animation


Topic: Turn of Chart animation

Masaia asked 3 years ago

Expected behavior Although I like the animation of the line chart, it's going to be an "continuous (every 10 seconds) update" so either I want it to animate only once at start, or I don't want it to animate at all... I've been trying to turn of the animation, but to no luck... So far...

Actual behavior It keeps animating...

Resources (screenshots, code snippets etc.) I've tried some variations on: new mdb.Chart(chartnl3rdparty, { type: 'line', options: { animation: { duration: 0 }, responsive: true }} );

Must be something like this, but I guess I'm not putting it in the right place, or not using the correct values.

Thanks in advance for your reply.

Marc Sonius


Dawid Wajszczuk staff answered 3 years ago

Hi,

You can try adding { options: { animation: false }} to your Chart. Something like this:

new mdb.Chart(document.getElementById('chart'), data, {
  options: {
    animation: false
  }
});

Here is the snippet: https://mdbootstrap.com/snippets/standard/d-wajszczuk/3309978#js-tab-view.

Keep coding,
Dawid


Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue
  • User: Free
  • Premium support: No
  • Technology: MDB Standard
  • MDB Version: MDB5 3.9.0
  • Device: Laptop
  • Browser: Chrome
  • OS: Ubuntu
  • Provided sample code: No
  • Provided link: No