瀏覽代碼

预览的图表主题

xyxie 7 月之前
父節點
當前提交
019521c065
共有 1 個文件被更改,包括 6 次插入2 次删除
  1. 6 2
      controllers/data_manage/range_analysis/chart_info.go

+ 6 - 2
controllers/data_manage/range_analysis/chart_info.go

@@ -86,10 +86,14 @@ func (this *RangeChartChartInfoController) Preview() {
 	chartInfo := new(data_manage.ChartInfoView)
 	chartInfo.ChartType = 1
 	chartInfo.Source = utils.CHART_SOURCE_RANGE_ANALYSIS
-	chartTheme, err := chart_theme.GetSystemChartTheme(chartInfo.ChartType)
+	chartThemeType, err := chart_theme.GetChartThemeTypeByChartTypeAndSource(chartInfo.ChartType, 1)
+	if err != nil {
+		return
+	}
+	chartTheme, err := data.GetChartThemeConfig(chartThemeType.DefaultChartThemeId, utils.CHART_SOURCE_DEFAULT, chartInfo.ChartType)
 	if err != nil {
 		br.Msg = "获取失败"
-		br.ErrMsg = "获取图表主题失败, Err:" + err.Error()
+		br.ErrMsg = "获取主题信息失败,Err:" + err.Error()
 		return
 	}
 	chartInfo.ChartThemeId = chartTheme.ChartThemeId