Roc 2 年之前
父节点
当前提交
50f7f89cc6
共有 1 个文件被更改,包括 5 次插入1 次删除
  1. 5 1
      services/data/chart_info.go

+ 5 - 1
services/data/chart_info.go

@@ -631,8 +631,12 @@ func BarChartData(mappingList []*models.ChartEdbInfoMapping, edbDataListMap map[
 			}
 		}
 
+		yDate := "0000-00-00"
+		if !maxDate.IsZero() {
+			yDate = maxDate.Format(utils.FormatDate)
+		}
 		yDataList = append(yDataList, models.YData{
-			Date:  maxDate.Format(utils.FormatDate),
+			Date:  yDate,
 			Value: findDataList,
 			Color: barChartInfoDate.Color,
 			Name:  barChartInfoDate.Name,