diff --git a/core/core-backend/src/main/java/io/dataease/chart/manage/ChartViewThresholdManage.java b/core/core-backend/src/main/java/io/dataease/chart/manage/ChartViewThresholdManage.java index c08d1c2a65..c63c17ae03 100644 --- a/core/core-backend/src/main/java/io/dataease/chart/manage/ChartViewThresholdManage.java +++ b/core/core-backend/src/main/java/io/dataease/chart/manage/ChartViewThresholdManage.java @@ -413,7 +413,7 @@ public class ChartViewThresholdManage { DatasetTableFieldDTO field = item.getField(); String dataeaseName = field.getDataeaseName(); String value = item.getValue(); - float tempFVal = 0f; + Float tempFVal = StringUtils.equalsAny(value, "min", "max") ? null : 0f; int validLen = 0; for (Map row : rows) { @@ -421,9 +421,17 @@ public class ChartViewThresholdManage { if (ObjectUtils.isEmpty(o)) continue; float fvalue = Float.parseFloat(o.toString()); if (StringUtils.equals("min", value)) { - tempFVal = Math.min(tempFVal, fvalue); + if (ObjectUtils.isEmpty(tempFVal)) { + tempFVal = fvalue; + } else { + tempFVal = Math.min(tempFVal, fvalue); + } } else if (StringUtils.equals("max", value)) { - tempFVal = Math.max(tempFVal, fvalue); + if (ObjectUtils.isEmpty(tempFVal)) { + tempFVal = fvalue; + } else { + tempFVal = Math.max(tempFVal, fvalue); + } } else if (StringUtils.equals("average", value)) { tempFVal += fvalue; validLen++; diff --git a/core/core-frontend/src/components/de-app/AppExportForm.vue b/core/core-frontend/src/components/de-app/AppExportForm.vue index c318738ef9..ed4d37c19e 100644 --- a/core/core-frontend/src/components/de-app/AppExportForm.vue +++ b/core/core-frontend/src/components/de-app/AppExportForm.vue @@ -19,7 +19,7 @@ diff --git a/core/core-frontend/src/components/visualization/CanvasOptBar.vue b/core/core-frontend/src/components/visualization/CanvasOptBar.vue index ea3b5e3af2..9199b4ddf2 100644 --- a/core/core-frontend/src/components/visualization/CanvasOptBar.vue +++ b/core/core-frontend/src/components/visualization/CanvasOptBar.vue @@ -1,6 +1,6 @@