diff --git a/core/core-frontend/src/views/chart/components/js/panel/charts/g2/bar/group-bar.ts b/core/core-frontend/src/views/chart/components/js/panel/charts/g2/bar/group-bar.ts index 1ce2654b60..6fba2d4fe9 100644 --- a/core/core-frontend/src/views/chart/components/js/panel/charts/g2/bar/group-bar.ts +++ b/core/core-frontend/src/views/chart/components/js/panel/charts/g2/bar/group-bar.ts @@ -59,7 +59,7 @@ export class GroupBar extends StackBar { protected configLabel(chart: Chart, options: ViewSpec): ViewSpec { const customAttr = parseJson(chart.customAttr) const { label: labelAttr } = customAttr - if (!labelAttr || !labelAttr.show) return options + if (!labelAttr.show || !labelAttr.childrenShow) return options const { children } = options if (labelAttr.showExtremum) { diff --git a/core/core-frontend/src/views/chart/components/js/panel/charts/g2/bar/group-stack-bar.ts b/core/core-frontend/src/views/chart/components/js/panel/charts/g2/bar/group-stack-bar.ts index 46fd109ce1..22dab707c0 100644 --- a/core/core-frontend/src/views/chart/components/js/panel/charts/g2/bar/group-stack-bar.ts +++ b/core/core-frontend/src/views/chart/components/js/panel/charts/g2/bar/group-stack-bar.ts @@ -29,7 +29,7 @@ export class GroupStackBar extends StackBar { protected configLabel(chart: Chart, options: ViewSpec): ViewSpec { const customAttr = parseJson(chart.customAttr) const { label: labelAttr } = customAttr - if (!labelAttr || !labelAttr.show) return options + if (!labelAttr.show) return options const { children } = options const position = { diff --git a/core/core-frontend/src/views/chart/components/js/panel/charts/g2/bar/percentage-stack-bar.ts b/core/core-frontend/src/views/chart/components/js/panel/charts/g2/bar/percentage-stack-bar.ts index 93f48cda33..83e8f4cae5 100644 --- a/core/core-frontend/src/views/chart/components/js/panel/charts/g2/bar/percentage-stack-bar.ts +++ b/core/core-frontend/src/views/chart/components/js/panel/charts/g2/bar/percentage-stack-bar.ts @@ -25,7 +25,7 @@ export class PercentageStackBar extends GroupStackBar { protected configLabel(chart: Chart, options: ViewSpec): ViewSpec { const customAttr = parseJson(chart.customAttr) const { label: labelAttr } = customAttr - if (!labelAttr || !labelAttr.show) return options + if (!labelAttr.show) return options const { children } = options const position = { diff --git a/core/core-frontend/src/views/chart/components/js/panel/charts/g2/bar/percentage-stack-horizontal-bar.ts b/core/core-frontend/src/views/chart/components/js/panel/charts/g2/bar/percentage-stack-horizontal-bar.ts index 0b5b3c60ac..ec745742a5 100644 --- a/core/core-frontend/src/views/chart/components/js/panel/charts/g2/bar/percentage-stack-horizontal-bar.ts +++ b/core/core-frontend/src/views/chart/components/js/panel/charts/g2/bar/percentage-stack-horizontal-bar.ts @@ -25,7 +25,7 @@ export class PercentageStackBar extends HorizontalStackBar { protected configLabel(chart: Chart, options: ViewSpec): ViewSpec { const customAttr = parseJson(chart.customAttr) const { label: labelAttr } = customAttr - if (!labelAttr || !labelAttr.show) return options + if (!labelAttr.show) return options const { children } = options const position = { diff --git a/core/core-frontend/src/views/chart/components/js/panel/charts/g2/bar/range-bar.ts b/core/core-frontend/src/views/chart/components/js/panel/charts/g2/bar/range-bar.ts index b9e46cf453..df970902cb 100644 --- a/core/core-frontend/src/views/chart/components/js/panel/charts/g2/bar/range-bar.ts +++ b/core/core-frontend/src/views/chart/components/js/panel/charts/g2/bar/range-bar.ts @@ -141,7 +141,7 @@ export class RangeBar extends HorizontalBar { protected configLabel(chart: Chart, options: ViewSpec): ViewSpec { const customAttr = parseJson(chart.customAttr) const { label: labelAttr } = customAttr - if (!labelAttr || !labelAttr.show) return options + if (!labelAttr.show) return options const { children } = options const position = { diff --git a/core/core-frontend/src/views/chart/components/js/panel/charts/g2/bar/stack-bar.ts b/core/core-frontend/src/views/chart/components/js/panel/charts/g2/bar/stack-bar.ts index 5c5c9076d5..892db4d0f0 100644 --- a/core/core-frontend/src/views/chart/components/js/panel/charts/g2/bar/stack-bar.ts +++ b/core/core-frontend/src/views/chart/components/js/panel/charts/g2/bar/stack-bar.ts @@ -46,7 +46,7 @@ export class StackBar extends Bar { protected configLabel(chart: Chart, options: ViewSpec): ViewSpec { const customAttr = parseJson(chart.customAttr) const { label: labelAttr } = customAttr - if (!labelAttr || !labelAttr.show) return options + if (!labelAttr.show) return options const { children } = options const position = { diff --git a/core/core-frontend/src/views/chart/components/js/panel/charts/g2/bar/waterfall.ts b/core/core-frontend/src/views/chart/components/js/panel/charts/g2/bar/waterfall.ts index a9f68ba030..4ae3bcaf41 100644 --- a/core/core-frontend/src/views/chart/components/js/panel/charts/g2/bar/waterfall.ts +++ b/core/core-frontend/src/views/chart/components/js/panel/charts/g2/bar/waterfall.ts @@ -216,7 +216,7 @@ export class Waterfall extends Bar { protected configLabel(chart: Chart, options: ViewSpec): ViewSpec { const customAttr = parseJson(chart.customAttr) const { label: labelAttr } = customAttr - if (!labelAttr || !labelAttr.show) return options + if (!labelAttr.show) return options const { children } = options const position = {