From 47ecd45bdccdb9e1bbbb8d291ee36e947e6a5148 Mon Sep 17 00:00:00 2001 From: wisonic Date: Mon, 8 Dec 2025 17:23:12 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E5=9B=BE=E8=A1=A8):=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E7=99=BE=E5=88=86=E6=AF=94=E6=9D=A1=E5=BD=A2=E5=9B=BE=E6=A0=87?= =?UTF-8?q?=E7=AD=BE=E4=B8=8D=E6=98=BE=E7=A4=BA=20#17509?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/js/panel/charts/bar/horizontal-bar.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/core/core-frontend/src/views/chart/components/js/panel/charts/bar/horizontal-bar.ts b/core/core-frontend/src/views/chart/components/js/panel/charts/bar/horizontal-bar.ts index 19fec85b3a..90ff3bdbeb 100644 --- a/core/core-frontend/src/views/chart/components/js/panel/charts/bar/horizontal-bar.ts +++ b/core/core-frontend/src/views/chart/components/js/panel/charts/bar/horizontal-bar.ts @@ -628,14 +628,14 @@ export class HorizontalPercentageStackBar extends HorizontalStackBar { 'tooltip-selector': ['color', 'fontSize', 'backgroundColor', 'show'] } protected configLabel(chart: Chart, options: BarOptions): BarOptions { - const baseOptions = super.configLabel(chart, options) - if (!baseOptions.label) { - return baseOptions + const baseLabel = getLabel(chart) + if (!baseLabel) { + return { ...options, label: baseLabel } } const { customAttr } = chart const l = parseJson(customAttr).label const label = { - ...baseOptions.label, + ...baseLabel, formatter: function (data: Datum) { let value = data.value if (value) { @@ -662,7 +662,7 @@ export class HorizontalPercentageStackBar extends HorizontalStackBar { } } return { - ...baseOptions, + ...options, label } }