zwxi 8 months ago
parent
commit
e8cf970c33
1 changed files with 10 additions and 0 deletions
  1. 10 0
      services/data/chart_theme.go

+ 10 - 0
services/data/chart_theme.go

@@ -581,6 +581,11 @@ func GetChartThemeConfig(chartThemeId, source, chartType int) (chartTheme *chart
 
 	// 如果找到了,那么就返回
 	if chartTheme != nil {
+		// 兼容历史数据,加入新字段LineOptionList
+		newConfig, e := ConvertOldChartOptions(chartTheme.Config)
+		if e == nil {
+			chartTheme.Config = newConfig
+		}
 		return
 	}
 
@@ -602,6 +607,11 @@ func GetChartThemeConfig(chartThemeId, source, chartType int) (chartTheme *chart
 
 	// 如果找到了,那么就返回
 	if chartTheme != nil {
+		// 兼容历史数据,加入新字段LineOptionList
+		newConfig, e := ConvertOldChartOptions(chartTheme.Config)
+		if e == nil {
+			chartTheme.Config = newConfig
+		}
 		return
 	}