浏览代码

季节性图表 chartTheme为空兼容

hbchen 4 月之前
父节点
当前提交
d68421682e
共有 2 个文件被更改,包括 2 次插入2 次删除
  1. 1 1
      src/views/dataEntry_manage/mixins/chartPublic.js
  2. 1 1
      src/views/ppt_manage/mixins/mixins.js

+ 1 - 1
src/views/dataEntry_manage/mixins/chartPublic.js

@@ -1099,7 +1099,7 @@ export const chartSetMixin = {
       /* 主题样式*/
       const chartTheme =  this.chartInfo.ChartThemeStyle ? JSON.parse(this.chartInfo.ChartThemeStyle) : null;
       // 跟颜色对应
-      chartTheme.lineOptionList=chartTheme.lineOptionList.reverse().slice(-chartDataHandle.length)
+      chartTheme && (chartTheme.lineOptionList=chartTheme.lineOptionList.reverse().slice(-chartDataHandle.length))
       let seasonYdata = [],
         seasonData = [];
 

+ 1 - 1
src/views/ppt_manage/mixins/mixins.js

@@ -450,7 +450,7 @@ export default {
       temChartDataList
 
       // 跟颜色对应
-      chartTheme.lineOptionList=chartTheme.lineOptionList.reverse().slice(-chartDataHandle.length)
+      chartTheme && (chartTheme.lineOptionList=chartTheme.lineOptionList.reverse().slice(-chartDataHandle.length))
 
       let seasonYdata = [],
         seasonData = []