Commit c834ced6 authored by 陈龙's avatar 陈龙

fix: 修复历史曲线报错;设置置信区间颜色、箱线图颜色

parent c6fe1103
......@@ -13,7 +13,8 @@ const deviceParams = [
// deviceCode: 'EGBF00000018',
deviceCode: 'EGBF00000017',
// deviceCode: 'EGBF00000014',
sensors: '今日供水量,今日用电量,1#水箱液位,是否在线',
// sensors: '今日供水量,今日用电量,1#水箱液位,是否在线',
sensors: '今日供水量',
deviceType: '二供泵房',
pointAddressID: 4,
},
......
......@@ -331,12 +331,12 @@ const optionGenerator = (dataSource, cusOption, contrast, contrastOption, smooth
const seriesTemplate = (param, unit) => {
if (!param) return '';
const {value, encode} = param;
const val = value[encode.y[0]];
// const val = value[encode.y[0]];
const _unit = unit || 'Mpa';
const color = '#008CFF';
if (!isArray(value)) return ` <div style="display: flex; align-items: center;">
<span>${param.seriesName}</span><span style="display:inline-block;">:</span>
<span style="color:${color};margin: 0 5px 0 auto;">${value?.toFixed(3)}</span>
<span style="color:${color};margin: 0 5px 0 auto;">${value?.toFixed(3) ?? '-'}</span>
<span style="font-size: 12px;">${_unit}</span>
</div>`;
return `
......@@ -483,6 +483,12 @@ const optionGenerator = (dataSource, cusOption, contrast, contrastOption, smooth
name: '箱线图',
symbol: 'none',
data: otherData,
itemStyle: {
color: '#FFA200',
color0: '#44CD00',
borderColor: '#FFA200',
borderColor0: '#44CD00'
}
});
tooltip = tooltipAccessor(unit)
} else {
......@@ -501,6 +507,7 @@ const optionGenerator = (dataSource, cusOption, contrast, contrastOption, smooth
}) || [];
return _item;
});
console.log(series);
[[..._minData], [..._maxData]].forEach((item, index) => {
series.push({
name: index === 0 ? '最小值' : '最大值',
......@@ -511,7 +518,8 @@ const optionGenerator = (dataSource, cusOption, contrast, contrastOption, smooth
},
...(index !== 0 ? {
areaStyle: {
color: '#ccc'
color: series?.[0]?.itemStyle?.color ?? '#65a0d1',
opacity: 0.2,
}
} : {}),
stack: 'confidence-band',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment