fix(图表): 汇总表布尔类型字段汇总计算错误

This commit is contained in:
wisonic 2024-07-29 16:17:07 +08:00
parent 19f0b87f3e
commit 7956463194

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
},