mirror of
https://github.com/chartjs/Chart.js.git
synced 2024-10-06 20:29:12 +02:00
Merge pull request #1743 from nnnick/fix/1576
Gracefully handle setting `options.animation` to `false`
This commit is contained in:
commit
52ae1f7d3c
@ -229,7 +229,7 @@
|
||||
|
||||
render: function render(duration, lazy) {
|
||||
|
||||
if ((typeof duration !== 'undefined' && duration !== 0) || (typeof duration == 'undefined' && this.options.animation.duration !== 0)) {
|
||||
if (this.options.animation !== false && ((typeof duration !== 'undefined' && duration !== 0) || (typeof duration == 'undefined' && this.options.animation.duration !== 0))) {
|
||||
var animation = new Chart.Animation();
|
||||
animation.numSteps = (duration || this.options.animation.duration) / 16.66; //60 fps
|
||||
animation.easing = this.options.animation.easing;
|
||||
|
Loading…
Reference in New Issue
Block a user