zwxi 7 months ago
parent
commit
5d6e178b5d
1 changed files with 5 additions and 5 deletions
  1. 5 5
      services/data/chart_info.go

+ 5 - 5
services/data/chart_info.go

@@ -666,11 +666,11 @@ func getEdbDataMapList(chartInfoId, chartType int, calendar, startDate, endDate
 			var rightAxisDate time.Time
 			if jumpYear == 1 {
 				latestDate = latestDate.AddDate(-1, 0, 0)
-				latestDateStr := fmt.Sprintf("%d-%s", latestDate.Year(),xStartDate)
-				rightAxisDate, err = time.Parse(utils.FormatDate, latestDateStr)
-				if err != nil {
-					return
-				}
+			}
+			latestDateStr := fmt.Sprintf("%d-%s", latestDate.Year(),xStartDate)
+			rightAxisDate, err = time.Parse(utils.FormatDate, latestDateStr)
+			if err != nil {
+				return
 			}
 
 			newDataList := make([]*data_manage.EdbDataList, 0)