From 28cbf4f043cfc0a4621cc8683ba66bcbdd350eca Mon Sep 17 00:00:00 2001 From: zmc <zmc_li@foxmail.com> Date: 星期五, 01 十二月 2023 12:02:34 +0800 Subject: [PATCH] 1.增加了风险模型的弹出框组件 2.增加了用户可配置的页面 --- src/utils/chartFunction/exceptionOption.js | 44 ++++++++++++++++++++++++++++++++++---------- 1 files changed, 34 insertions(+), 10 deletions(-) diff --git a/src/utils/chartFunction/exceptionOption.js b/src/utils/chartFunction/exceptionOption.js index dde1fd9..bc7133f 100644 --- a/src/utils/chartFunction/exceptionOption.js +++ b/src/utils/chartFunction/exceptionOption.js @@ -8,7 +8,7 @@ * @param锛氬紓甯哥被鍨� * @returns锛� */ - setExceptionChartOption( + setExceptionChartOption({ xData, yData, exceptionBeginTime, @@ -17,7 +17,9 @@ endIndex, exceptionName, areaObj, + lineColor, exceptionType + } ) { switch (exceptionType) { case '0': @@ -65,7 +67,8 @@ exceptionName ) case '8': - return this.validOption(xData, yData, exceptionName, areaObj) + console.log('浼犺繘鏉�',lineColor) + return this.validOption(xData, yData, exceptionName, areaObj,lineColor) } }, @@ -301,7 +304,7 @@ name: '棰楃矑鐗╂祿搴�', type: 'line', data: yData.map((item) => { - if (item <= 0.01) { + if (item <= 0.02) { return { value: item, itemStyle: { @@ -331,9 +334,8 @@ { name: '鏁版嵁瓒呬綆', type: 'average', - yAxis: 0.01, + yAxis: 0.02, lineStyle: { - // color: '#ff0000' color: 'red' } } @@ -564,7 +566,7 @@ * @param锛� * @returns锛� */ - validOption(xData, yData, exceptionName, areaObj) { + validOption(xData, yData, exceptionName, areaObj,lineColor) { return { title: { text: exceptionName, @@ -577,9 +579,6 @@ toolbox: { // 宸ュ叿鏍� feature: { - // dataZoom: { - // yAxisIndex: 'none' - // }, // 淇濆瓨涓哄浘鐗� saveAsImage: {} } @@ -622,7 +621,32 @@ data: areaObj } } - ] + ], + // 鎸囧畾鏃堕棿鍖洪棿鐨勭嚎娈靛彉棰滆壊 + // visualMap: { + // show: false, + // dimension: 0, + + // // pieces: [ + // // { + // // lte: beginIndex, + // // color: 'green' + // // }, + // // { + // // gt: beginIndex, + // // lte: endIndex, + // // color: 'red' + // // }, + // // { + // // gt: endIndex, + // // lte: xData.length - 1, + // // color: 'green' + // // } + // // ], + + // pieces: lineColor + + // } } } } -- Gitblit v1.9.3