Merge pull request #1037 from dataease/pr@dev@feat_table_summary

feat: 表格合计调整
This commit is contained in:
XiaJunjie2020 2021-10-28 11:38:48 +08:00 committed by GitHub
commit 92a7daa5d0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -283,10 +283,11 @@ export default {
const that = this
const means = [] //
columns.forEach((column, columnIndex) => {
if (columnIndex === 0) {
const x = JSON.parse(that.chart.xaxis)
if (columnIndex === 0 && x.length > 0) {
means.push('合计')
} else {
if (columnIndex >= that.chart.data.fields.length - that.chart.data.series.length) {
if (columnIndex >= x.length) {
const values = data.map(item => Number(item[column.property]))
//
if (!values.every(value => isNaN(value))) {