From 6461128fc4dde2f0e6559daeec7b8e48a31487bc Mon Sep 17 00:00:00 2001 From: Scott Dickerson Date: Wed, 6 Nov 2019 15:29:12 -0600 Subject: [PATCH] feat(chart): legend.visible = false to hide the legend --- packages/core/src/axis-chart.ts | 2 +- packages/core/src/chart.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/core/src/axis-chart.ts b/packages/core/src/axis-chart.ts index c6c3c24a75..ada3e414ce 100644 --- a/packages/core/src/axis-chart.ts +++ b/packages/core/src/axis-chart.ts @@ -86,7 +86,7 @@ export class AxisChart extends Chart { this.model, this.services, [ - legendComponent, + ...((this.model.getOptions().legend.visible !== false) ? [ legendComponent ] :[ ]), graphFrameComponent ], { diff --git a/packages/core/src/chart.ts b/packages/core/src/chart.ts index e70492fa13..af5467c2ee 100644 --- a/packages/core/src/chart.ts +++ b/packages/core/src/chart.ts @@ -171,7 +171,7 @@ export class Chart { this.model, this.services, [ - legendComponent, + ...((this.model.getOptions().legend.visible !== false) ? [ legendComponent ] :[ ]), graphFrameComponent ], {