hbchen 4 kuukautta sitten
vanhempi
commit
236223aafe
1 muutettua tiedostoa jossa 3 lisäystä ja 2 poistoa
  1. 3 2
      src/views/ppt_manage/mixins/mixins.js

+ 3 - 2
src/views/ppt_manage/mixins/mixins.js

@@ -380,7 +380,8 @@ export default {
 
         //预测指标配置
         let predict_params = item.EdbInfoCategoryType === 1 ? this.getPredictParams(item,chartStyle) : {};
-        
+        //图表可配置的线条数就10条,第11条用第1条的配置,索引取下模
+				const lineIndex = chartTheme ? index%chartTheme.lineOptionList.length : index
         //中英文名称
         const nameCh = dynamic_arr.length > 1
         ? `${item.EdbAliasName||item.EdbName}(${item.SourceName})${dynamic_tag}`
@@ -396,7 +397,7 @@ export default {
           nameCh:nameCh,
           nameEn:nameEn,
           color: item.ChartColor,
-          lineWidth: Number(item.ChartWidth),
+          lineWidth: Number(item.ChartWidth)||(chartTheme&&chartTheme.lineOptionList[lineIndex].lineWidth) || 1,
           // fillColor: (this.chartInfo.ChartType === 3 || (this.chartInfo.ChartType === 6 && item.ChartStyle === 'areaspline')) ? item.ChartColor : undefined,
           borderWidth: 1,
           borderColor: item.ChartColor,