Przeglądaj źródła

Merge branch 'bug7794' into debug

shanbinzhang 2 miesięcy temu
rodzic
commit
c69d6a33dd
1 zmienionych plików z 12 dodań i 2 usunięć
  1. 12 2
      src/views/hzyb/hooks/chartRender.js

+ 12 - 2
src/views/hzyb/hooks/chartRender.js

@@ -743,7 +743,17 @@ function setStackOrCombinChart(e) {
       //预测指标配置
       let predict_params = item.EdbInfoCategoryType === 1 ? getPredictParams(item,chartStyle) : {};
       //图表可配置的线条数就10条,第11条用第1条的配置,索引取下模
-      const lineIndex = chartTheme ? index%chartTheme.lineOptionList.length : index
+      const lineIndex = chartTheme ? index%chartTheme.lineOptionList.length : index;
+
+      //堆叠控制
+      let stacking = undefined;
+      if(e.ChartInfo.ChartType===4) {
+          stacking = 'normal';
+      }else if(e.ChartInfo.ChartType===6) {
+          stacking = !e.DataResp.IsHeap ? undefined:'normal';
+      }else if(e.ChartInfo.ChartType===3&&ExtraConfig.IsHeap) {
+          stacking = ExtraConfig.HeapWay===1?'normal':'percent';
+      }
       let seriesItemObj={
           data:[],
           dataGrouping:{
@@ -759,7 +769,7 @@ function setStackOrCombinChart(e) {
           LatestDate:item.LatestDate,
           LatestValue:item.LatestValue,
           ...predict_params,
-          stacking:e.ChartInfo.ChartType==6?!e.DataResp.IsHeap?undefined:'normal':e.ChartInfo.ChartType==3&&ExtraConfig.IsHeap==1?ExtraConfig.HeapWay==1?'normal':'percent':undefined,
+          stacking,
           threshold: e.ChartInfo.ChartType==3?item.ChartScale?Number(item.ChartScale):0:null
       }
       item.DataList = item.DataList || [];