|
@@ -2,6 +2,12 @@
|
|
import Highcharts from 'highcharts';
|
|
import Highcharts from 'highcharts';
|
|
import { defaultOpts, seasonOptions,getTerminal,browser } from '@/utils/defaultOptions';
|
|
import { defaultOpts, seasonOptions,getTerminal,browser } from '@/utils/defaultOptions';
|
|
|
|
|
|
|
|
+//获取RGBA的透明度
|
|
|
|
+const parseRgbaColor = (color='rgba(51, 51, 51, 1)') => {
|
|
|
|
+ const arr = color.match(/(\d(\.\d+)?)+/g) || ['','','',1];
|
|
|
|
+ return parseFloat(arr[3]||1)
|
|
|
|
+}
|
|
|
|
+
|
|
// 散点x轴
|
|
// 散点x轴
|
|
const scatterXAxis = {
|
|
const scatterXAxis = {
|
|
tickPosition: 'inside',
|
|
tickPosition: 'inside',
|
|
@@ -500,7 +506,8 @@ export default {
|
|
type:'arearange',//上下限是一个范围
|
|
type:'arearange',//上下限是一个范围
|
|
data:[],
|
|
data:[],
|
|
name:MaxMinLimits.Legend||'同期上下限',
|
|
name:MaxMinLimits.Legend||'同期上下限',
|
|
- color:MaxMinLimits.Color||'#075EEE'
|
|
|
|
|
|
+ color:MaxMinLimits.Color||'#075EEE',
|
|
|
|
+ fillOpacity:parseRgbaColor(MaxMinLimits.Color||'')>0.75?0.75:parseRgbaColor(MaxMinLimits.Color||'') //透明度最高0.75
|
|
}
|
|
}
|
|
MaxMinLimits.List.forEach(item=>{
|
|
MaxMinLimits.List.forEach(item=>{
|
|
serieItem.data.push([item.DataTimestamp,item.MinValue,item.MaxValue])
|
|
serieItem.data.push([item.DataTimestamp,item.MinValue,item.MaxValue])
|
|
@@ -526,7 +533,8 @@ export default {
|
|
type:'arearange',//标准差也是一个范围
|
|
type:'arearange',//标准差也是一个范围
|
|
data:[],
|
|
data:[],
|
|
name:SamePeriodStandardDeviation.Legend||'同期标准差',
|
|
name:SamePeriodStandardDeviation.Legend||'同期标准差',
|
|
- color:SamePeriodStandardDeviation.Color||'#075EEE'
|
|
|
|
|
|
+ color:SamePeriodStandardDeviation.Color||'#075EEE',
|
|
|
|
+ fillOpacity:parseRgbaColor(SamePeriodStandardDeviation.Color||'')>0.75?0.75:parseRgbaColor(SamePeriodStandardDeviation.Color||'')
|
|
}
|
|
}
|
|
SamePeriodStandardDeviation.List.forEach(item=>{
|
|
SamePeriodStandardDeviation.List.forEach(item=>{
|
|
serieItem.data.push([item.DataTimestamp,item.MinValue,item.MaxValue])
|
|
serieItem.data.push([item.DataTimestamp,item.MinValue,item.MaxValue])
|
|
@@ -607,6 +615,12 @@ export default {
|
|
//如果有右轴,seasonYdata加上右轴
|
|
//如果有右轴,seasonYdata加上右轴
|
|
if(SeasonRightConfig.IsShow){
|
|
if(SeasonRightConfig.IsShow){
|
|
const rightEdb = (SeasonRightConfig.IndicatorType===1?SeasonRightConfig.EdbInfoList[0]:this.dataList[1])||{unit:''}
|
|
const rightEdb = (SeasonRightConfig.IndicatorType===1?SeasonRightConfig.EdbInfoList[0]:this.dataList[1])||{unit:''}
|
|
|
|
+ //左轴同比:text为空或% 右轴指标:取指标单位
|
|
|
|
+ if(SeasonRightConfig.IndicatorType===1){
|
|
|
|
+ rightEdb.Unit = SeasonRightConfig.NumFormat===1?'%':''
|
|
|
|
+ }else{
|
|
|
|
+ rightEdb.Unit = this.dataList[1]&&(this.dataList[1].ConvertUnit||this.dataList[1].Unit)||''
|
|
|
|
+ }
|
|
seasonYdata.push({
|
|
seasonYdata.push({
|
|
...seasonOptions.yAxis,
|
|
...seasonOptions.yAxis,
|
|
opposite: true,//右轴
|
|
opposite: true,//右轴
|
|
@@ -621,7 +635,7 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
title: {
|
|
title: {
|
|
- text: SeasonRightConfig.Legend||'右轴test',
|
|
|
|
|
|
+ text: rightEdb.Unit||'',
|
|
style:{
|
|
style:{
|
|
...chartTheme&&chartTheme.yAxisOptions.style
|
|
...chartTheme&&chartTheme.yAxisOptions.style
|
|
},
|
|
},
|