Commit 42e68f08 authored by 陈龙's avatar 陈龙

fix:修复历史曲线在全部为异常值时,显示最大最小值异常的问题

parent 9622dd3a
......@@ -37,12 +37,12 @@ const deviceParams = [
deviceType: '二供机组',
// pointAddressID: 208,
},*/
{
/* {
"deviceCode": "SC00000001",
// "sensors": "出厂瞬时流量1,1#清水池液位,2#清水池液位,今日供水量,出水压力1",
"sensors": "出厂瞬时流量1",
"deviceType": "水厂"
}
}*/
/* {
deviceCode: 'EGJZ00000198',
// sensors: '进水压力,出水压力,出水瞬时流量,出水累计流量',
......@@ -160,7 +160,12 @@ const deviceParams = [
"sensors": "频率,站点在线状态",
"deviceType": "送水泵"
}*/
/*界首*/
{
"deviceCode": "SYJ00000022",
"sensors": "IC",
"deviceType": "水源井"
}
];
const Demo = () => {
......
......@@ -905,6 +905,7 @@ const renderItem = (params, api) => {
const returnCustomSeries = (dataSource) => {
let _maxNumber = returnMaxOrMinNumber(dataSource, 'max');
let _minNumber = returnMaxOrMinNumber(dataSource, 'min');
if (!_maxNumber.length && !_minNumber.length) return false;
// let _period = returnMaxOrMinNumber(dataSource, 'period');
// 需要将最大值最小分别传入,后续计算图例位置需要,先min后max
let _max = _maxNumber[1];
......@@ -1033,7 +1034,7 @@ const optionGenerator = (
lineStyle: {
...(item.lineStyle ?? {}),
width: 1,
opacity:0.4
opacity: 0.4
}
};
});
......@@ -1154,7 +1155,9 @@ const optionGenerator = (
let _dataSource = dataSource?.filter((item) => item?.dataModel?.length);
if (_dataSource?.length) {
let _customSeries = returnCustomSeries(dataSource);
series.push(_customSeries);
if (_customSeries) {
series.push(_customSeries);
}
}
}
} else {
......
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