From fc7b433918c9200a08a97dced41a07526c7c7554 Mon Sep 17 00:00:00 2001 From: junjie Date: Thu, 8 Apr 2021 15:04:32 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E8=A7=86=E5=9B=BE):fix?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/io/dataease/service/chart/ChartViewService.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/backend/src/main/java/io/dataease/service/chart/ChartViewService.java b/backend/src/main/java/io/dataease/service/chart/ChartViewService.java index 9d60590fcc..d76da66db4 100644 --- a/backend/src/main/java/io/dataease/service/chart/ChartViewService.java +++ b/backend/src/main/java/io/dataease/service/chart/ChartViewService.java @@ -136,7 +136,6 @@ public class ChartViewService { } for (String[] d : data) { StringBuilder a = new StringBuilder(); - BigDecimal b = new BigDecimal("0"); for (int i = 0; i < xAxis.size(); i++) { if (i == xAxis.size() - 1) { a.append(d[i]); @@ -147,7 +146,7 @@ public class ChartViewService { x.add(a.toString()); for (int i = xAxis.size(); i < xAxis.size() + yAxis.size(); i++) { int j = i - xAxis.size(); - series.get(j).getData().add(new BigDecimal(d[i])); + series.get(j).getData().add(new BigDecimal(d[i] == null ? "0" : d[i])); } } Map map = new HashMap<>();