|
@@ -780,7 +780,7 @@ const setStackOrCombinChart = () => {
|
|
|
// const chartData = _.cloneDeep(dataList);
|
|
|
//有右二轴时排个序 按照左 右 右2的顺序
|
|
|
let chartData = dataList.some(_ =>_.IsAxis===2) ? changeEdbOrder(dataList) : _.cloneDeep(dataList);
|
|
|
- let ExtraConfig={}
|
|
|
+ let ExtraConfig:any={}
|
|
|
if(chartInfo.ChartType===3 && chartInfo.ExtraConfig){
|
|
|
ExtraConfig=JSON.parse(chartInfo.ExtraConfig)
|
|
|
}
|
|
@@ -887,7 +887,18 @@ const setStackOrCombinChart = () => {
|
|
|
//预测指标配置
|
|
|
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:(string|undefined) = undefined;
|
|
|
+ if(chartInfo.ChartType===4) {
|
|
|
+ stacking = 'normal';
|
|
|
+ }else if(chartInfo.ChartType===6) {
|
|
|
+ stacking = !DataResp.IsHeap ? undefined:'normal';
|
|
|
+ }else if(chartInfo.ChartType===3&&ExtraConfig?.IsHeap) {
|
|
|
+ stacking = ExtraConfig?.HeapWay===1?'normal':'percent';
|
|
|
+ }
|
|
|
+
|
|
|
let obj = {
|
|
|
data: [] as any[],
|
|
|
type: chartInfo.ChartType!==3?(chartStyle || item.ChartStyle):ExtraConfig?.IsHeap==1?'area':((chartTheme && chartTheme.lineOptionList[lineIndex].lineType) || item.ChartStyle),
|
|
@@ -900,7 +911,7 @@ const setStackOrCombinChart = () => {
|
|
|
borderWidth: 1,
|
|
|
borderColor: item.ChartColor,
|
|
|
...predict_params,
|
|
|
- stacking:chartInfo.ChartType==6?DataResp.IsHeap!==1?undefined:'normal':chartInfo.ChartType==3&&ExtraConfig?.IsHeap==1?ExtraConfig?.HeapWay==1?'normal':'percent':undefined,
|
|
|
+ stacking,
|
|
|
threshold: chartInfo.ChartType==3?item.ChartScale?Number(item.ChartScale):0:null
|
|
|
};
|
|
|
|