From 7b5af70d80934bc622183cc48b16990cbf19e6e9 Mon Sep 17 00:00:00 2001 From: Arjun Choudhary Date: Tue, 15 Nov 2022 17:37:56 +0530 Subject: [PATCH] fix: showLegend and truncateLegend --- src/js/charts/BaseChart.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/js/charts/BaseChart.js b/src/js/charts/BaseChart.js index ab8de8e..dfdd14d 100644 --- a/src/js/charts/BaseChart.js +++ b/src/js/charts/BaseChart.js @@ -50,10 +50,14 @@ export default class BaseChart { this.config = { showTooltip: 1, // calculate - showLegend: 1, // calculate + showLegend: + typeof options.showLegend !== "undefined" ? options.showLegend : 1, isNavigable: options.isNavigable || 0, animate: typeof options.animate !== "undefined" ? options.animate : 1, - truncateLegends: options.truncateLegends || 1, + truncateLegends: + typeof options.truncateLegends !== "undefined" + ? options.truncateLegends + : 1, }; this.measures = JSON.parse(JSON.stringify(BASE_MEASURES));