fix(图表): 修复明细表合并单元格序号列计算错误

This commit is contained in:
wisonic 2024-11-06 16:49:00 +08:00
parent 40ad9bf2f4
commit 9078eb5f4c

View File

@ -1505,7 +1505,10 @@ export function configMergeCells(chart: Chart, options: S2Options, dataConfig: S
} }
export function getRowIndex(mergedCellsInfo: MergedCellInfo[][], meta: ViewMeta): number { export function getRowIndex(mergedCellsInfo: MergedCellInfo[][], meta: ViewMeta): number {
let curRangeStartIndex = 0 if (!mergedCellsInfo?.length) {
return meta.rowIndex + 1
}
let curRangeStartIndex = meta.rowIndex
const lostCells = mergedCellsInfo.reduce((p, n) => { const lostCells = mergedCellsInfo.reduce((p, n) => {
if (n[0].colIndex !== 0) { if (n[0].colIndex !== 0) {
return p return p