From d413a8ce15dfe081fe025e5329a7f4bcc9459457 Mon Sep 17 00:00:00 2001 From: Scott Dickerson Date: Fri, 17 Jan 2020 12:34:09 -0600 Subject: [PATCH] fix(chart): update isLegendEnabled instead of isEnabled --- packages/core/src/axis-chart.ts | 6 +++--- packages/core/src/chart.ts | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/core/src/axis-chart.ts b/packages/core/src/axis-chart.ts index 30ba6d9808..517b8be316 100644 --- a/packages/core/src/axis-chart.ts +++ b/packages/core/src/axis-chart.ts @@ -61,11 +61,11 @@ export class AxisChart extends Chart { } }; - const isEnabled = this.model.getOptions().legend.enabled !== false; + const isLegendEnabled = this.model.getOptions().legend.enabled !== false; // Decide the position of the legend in reference to the chart let fullFrameComponentDirection = LayoutDirection.COLUMN; - if (isEnabled) { + if (isLegendEnabled) { const legendPosition = Tools.getProperty(this.model.getOptions(), "legend", "position"); if (legendPosition === LegendPositions.LEFT) { fullFrameComponentDirection = LayoutDirection.ROW; @@ -102,7 +102,7 @@ export class AxisChart extends Chart { this.model, this.services, [ - ...(isEnabled ? [ legendComponent ] : [ ]), + ...(isLegendEnabled ? [ legendComponent ] : [ ]), legendSpacerComponent, graphFrameComponent ], diff --git a/packages/core/src/chart.ts b/packages/core/src/chart.ts index 74f0629134..b5e5a32a6f 100644 --- a/packages/core/src/chart.ts +++ b/packages/core/src/chart.ts @@ -149,11 +149,11 @@ export class Chart { } }; - const isEnabled = this.model.getOptions().legend.enabled !== false; + const isLegendEnabled = this.model.getOptions().legend.enabled !== false; // TODORF - REUSE BETWEEN AXISCHART & CHART // Decide the position of the legend in reference to the chart let fullFrameComponentDirection = LayoutDirection.COLUMN; - if (isEnabled) { + if (isLegendEnabled) { const legendPosition = Tools.getProperty(this.model.getOptions(), "legend", "position"); if (legendPosition === "left") { fullFrameComponentDirection = LayoutDirection.ROW; @@ -190,7 +190,7 @@ export class Chart { this.model, this.services, [ - ...(isEnabled ? [ legendComponent ] : [ ]), + ...(isLegendEnabled ? [ legendComponent ] : [ ]), legendSpacerComponent, graphFrameComponent ],