From 1911a78f80e47f0814dc46dc1e43e5ec2e721a76 Mon Sep 17 00:00:00 2001 From: wisonic Date: Mon, 19 Jan 2026 18:28:16 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E5=9B=BE=E8=A1=A8):=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E6=98=8E=E7=BB=86=E8=A1=A8=E5=8D=95=E5=85=83=E6=A0=BC=E5=90=88?= =?UTF-8?q?=E5=B9=B6=E5=AD=97=E6=AE=B5=E4=B8=BA=E5=8D=95=E4=B8=80=E5=AD=97?= =?UTF-8?q?=E6=AE=B5=E6=97=B6=E8=AE=A1=E7=AE=97=E9=94=99=E8=AF=AF=20#17472?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../chart/components/js/panel/common/common_table.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/core/core-frontend/src/views/chart/components/js/panel/common/common_table.ts b/core/core-frontend/src/views/chart/components/js/panel/common/common_table.ts index 06f7e07f08..b5b439ea74 100644 --- a/core/core-frontend/src/views/chart/components/js/panel/common/common_table.ts +++ b/core/core-frontend/src/views/chart/components/js/panel/common/common_table.ts @@ -2067,6 +2067,9 @@ export function configMergeCells(chart: Chart, options: S2Options, dataConfig: S const mergedCellsInfo = [] const axisToMerge = dataConfig.meta.filter((_, i) => i < quotaIndex || quotaIndex === -1) axisToMerge.forEach((a, i) => { + if (mergedColInfo[i - 1]) { + mergedColInfo[i - 1] = [] + } const preMergedColInfo = mergedColInfo[i] const curMergedColInfo = [] mergedColInfo.push(curMergedColInfo) @@ -2080,7 +2083,10 @@ export function configMergeCells(chart: Chart, options: S2Options, dataConfig: S const curRange = index - lastIndex if (curRange > 1 || (index === end && curRange === 1 && lastVal === curVal)) { const tmpMergeCells = [] - const textIndex = curRange % 2 === 1 ? (curRange - 1) / 2 : curRange / 2 - 1 + let textIndex = curRange % 2 === 1 ? (curRange - 1) / 2 : curRange / 2 - 1 + if (index === end && lastVal === curVal) { + textIndex = curRange % 2 === 1 ? (curRange - 1) / 2 : curRange / 2 + } for (let j = 0; j < curRange; j++) { tmpMergeCells.push({ colIndex: showIndex ? i + 1 : i,