Roc 2 жил өмнө
parent
commit
388936c9f7

+ 5 - 2
services/chart/chart_info.go

@@ -855,9 +855,12 @@ func BarChartData(mappingList []*chartEdbMappingModel.ChartEdbInfoMapping, edbDa
 				findDataList = append(findDataList, 0)
 			}
 		}
-
+		yDate := "0000-00-00"
+		if !maxDate.IsZero() {
+			yDate = maxDate.Format(utils.FormatDate)
+		}
 		yDataList = append(yDataList, chart_info.YData{
-			Date:  maxDate.Format(utils.FormatDate),
+			Date:  yDate,
 			Value: findDataList,
 			Color: barChartInfoDate.Color,
 			Name:  barChartInfoDate.Name,