diff --git a/core/core-frontend/src/views/chart/components/js/panel/charts/bar/bar.ts b/core/core-frontend/src/views/chart/components/js/panel/charts/bar/bar.ts index 2a845abad0..691da4991e 100644 --- a/core/core-frontend/src/views/chart/components/js/panel/charts/bar/bar.ts +++ b/core/core-frontend/src/views/chart/components/js/panel/charts/bar/bar.ts @@ -436,10 +436,11 @@ export class GroupBar extends StackBar { } protected configLabel(chart: Chart, options: ColumnOptions): ColumnOptions { - const baseOptions = super.configLabel(chart, options) - if (!baseOptions.label) { - return baseOptions + const tmpLabel = getLabel(chart) + if (!tmpLabel) { + return options } + const baseOptions = { ...options, label: tmpLabel } const { label: labelAttr } = parseJson(chart.customAttr) baseOptions.label.style.fill = labelAttr.color const label = { @@ -517,10 +518,11 @@ export class GroupStackBar extends StackBar { } protected configLabel(chart: Chart, options: ColumnOptions): ColumnOptions { - const baseOptions = super.configLabel(chart, options) - if (!baseOptions.label) { - return baseOptions + const tmpLabel = getLabel(chart) + if (!tmpLabel) { + return options } + const baseOptions = { ...options, label: tmpLabel } const { label: labelAttr } = parseJson(chart.customAttr) baseOptions.label.style.fill = labelAttr.color const label = {