fix(图表): 修复明细表合并单元格计算错误 #13283

This commit is contained in:
wisonic
2024-12-03 22:45:38 +08:00
parent f0434d638f
commit 93d39e333c

View File

@@ -1505,7 +1505,7 @@ export function configMergeCells(chart: Chart, options: S2Options, dataConfig: S
showText: j === textIndex
})
}
if (index === end) {
if (index === end && lastVal === curVal) {
tmpMergeCells.push({
colIndex: showIndex ? i + 1 : i,
rowIndex: index,
@@ -1513,7 +1513,7 @@ export function configMergeCells(chart: Chart, options: S2Options, dataConfig: S
})
}
mergedCellsInfo.push(tmpMergeCells)
curMergedColInfo.push([lastIndex, index === end ? index : index - 1])
curMergedColInfo.push([lastIndex, index === end && lastVal === curVal ? index : index - 1])
}
lastVal = curVal
lastIndex = index