From 2c3d8a52f2841e85e4802a2548ceb3976f064d3b Mon Sep 17 00:00:00 2001 From: Shivam Mishra Date: Sun, 1 Sep 2019 17:25:53 +0530 Subject: [PATCH] feat: allow disabling animations using 'animate' option --- src/js/charts/BaseChart.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/js/charts/BaseChart.js b/src/js/charts/BaseChart.js index e17c9e3..0c23766 100644 --- a/src/js/charts/BaseChart.js +++ b/src/js/charts/BaseChart.js @@ -32,7 +32,7 @@ export default class BaseChart { showTooltip: 1, // calculate showLegend: 1, // calculate isNavigable: options.isNavigable || 0, - animate: 1, + animate: (typeof options.animate !== 'undefined') ? options.animate : 1, truncateLegends: options.truncateLegends || 0 }; @@ -225,7 +225,7 @@ export default class BaseChart { } this.data = this.prepareData(data); this.calc(); // builds state - this.render(); + this.render(this.components, this.config.animate); } render(components=this.components, animate=true) {