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 ], {