zwxi 9 months ago
parent
commit
a4d90fec28
1 changed files with 7 additions and 1 deletions
  1. 7 1
      controllers/data_manage/chart_info.go

+ 7 - 1
controllers/data_manage/chart_info.go

@@ -1014,7 +1014,13 @@ func (this *ChartInfoController) ChartInfoDetail() {
 			br.ErrMsg = "获取主题信息失败,Err:" + err.Error()
 			return
 		}
-		chartInfo.ChartThemeStyle = chartTheme.Config
+		// 兼容历史数据,加入新字段LineOptionList
+		newConfig, e := data.ConvertOldChartOptions(chartTheme.Config)
+		if e != nil {
+			chartInfo.ChartThemeStyle = chartTheme.Config
+		} else {
+			chartInfo.ChartThemeStyle = newConfig
+		}
 		chartInfo.ChartThemeId = chartTheme.ChartThemeId
 
 		// 图表数据权限