as I was working on updating the code for my charts created with Chartjs
, I was using the migration guide:
https://www.chartjs.org/docs/next/getting-started/v3-migration.html
Most of the stuff written works, but I seem to have issues with some of the points written under Specific changes, to be precise it's these two:
responsiveAnimationDuration
is now configured in animation.resize.duration
hover.animationDuration
is now configured in animation.active.duration
So this is the structure I have in my code:
new Chart(
// ...
options: {
// ...
animation: {
resize: { // IDE already complaining here that 'resize' does not exist
duration: 0,
},
active: { // Same problem here
duration: 0,
},
},
},
I'm using version 3.5.1, if that's of any help
Is there anything I'm missing or am I doing something wrong? Did anyone else encounter this issue?
CodePudding user response:
you can just set animation
to false
:
options: {
animation: false,
...
You can read more at Disabling animation.