Merge pull request #11220 from dataease/pr@dev-v2@fix_table

Pr@dev v2@fix table
This commit is contained in:
wisonic-s 2024-07-29 16:20:17 +08:00 committed by GitHub
commit 38cf8120f8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 2 deletions

View File

@ -184,7 +184,8 @@ export class TableNormal extends S2ChartView<TableSheet> {
const summaryObj = newData.reduce(
(p, n) => {
yAxis.forEach(axis => {
p[axis.dataeaseName] = (n[axis.dataeaseName] || 0) + (p[axis.dataeaseName] || 0)
p[axis.dataeaseName] =
(parseFloat(n[axis.dataeaseName]) || 0) + (parseFloat(p[axis.dataeaseName]) || 0)
})
return p
},

View File

@ -70,7 +70,7 @@ export abstract class S2ChartView<P extends SpreadSheet> extends AntVAbstractCha
switch (cell.cellType) {
case 'dataCell':
if (meta.valueField === SERIES_NUMBER_FIELD) {
content = meta.fieldValue
content = meta.fieldValue.toString()
break
}
field = find(metaConfig, item => item.field === meta.valueField)