Commit 4a7ee3a4 authored by 陈龙's avatar 陈龙

feat: 优化

parent 891d79f3
......@@ -40,7 +40,7 @@ path: /
## 多图表
[//]: # (<code src="./demos/GridDemo.js"></code>)
<code src="./demos/GridDemo.js"></code>
## API
......
......@@ -8,7 +8,7 @@ const deviceParams = [
deviceType: '二供泵房',
pointAddressID: 4,
},
{
/* {
deviceCode: 'EGBF00000137',
sensors: '进水压力,出水瞬时流量,出水累计流量',
deviceType: '二供泵房',
......@@ -20,7 +20,7 @@ const deviceParams = [
sensors: '进水压力,出水瞬时流量,出水累计流量',
deviceType: '二供泵房',
pointAddressID: 4,
},
},*/
];
/*const deviceParams = [
{
......
......@@ -82,7 +82,7 @@ const deviceParams = [
"deviceType": "加矾间"
}, */
{
/* {
"deviceCode": "QSBF00000001",
"sensors": "取水浊度",
"deviceType": "取水泵房"
......@@ -101,7 +101,7 @@ const deviceParams = [
"deviceCode": "LLJ00000001",
"sensors": "瞬时流量",
"deviceType": "流量计"
},
},*/
/* {
deviceCode: 'EGJZ00000027',
sensors: '2#变频器运行频率',
......@@ -127,6 +127,12 @@ const deviceParams = [
"sensors": "pH",
"deviceType": "水质监测仪"
}*/
// 滦州
{
"deviceCode": "XMSB00000015",
"sensors": "今日出水量",
"deviceType": "熊猫水表"
}
];
const Demo = () => {
......
......@@ -755,7 +755,7 @@ const HistoryView = (props) => {
) : (
''
)}
{isChart && isSingle && showBoxOption && !isStatus ? (
{isChart && isSingle && showBoxOption && !isStatus && !grid ? (
<>
{lineDataType !== '原始曲线' ? (
<>
......
......@@ -1143,9 +1143,12 @@ const optionGenerator = (
}
// 单曲线需要标记最大值、最小值的情况下,需要增加自定义的series,将最大最小值显示在图表上
if (dataSource?.[0]?.dataModel?.length && chartType === 'lineChart') {
let _dataSource = dataSource?.filter(item => item.pv);
if (_dataSource?.length) {
let _customSeries = returnCustomSeries(dataSource);
series.push(_customSeries);
}
}
} else {
tooltip = tooltipAccessor(
series.map((item) => item.unit),
......
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