Commit 5907807c authored by 陈龙's avatar 陈龙

fix: 修复频率图表的MarkArea所有的区间左侧均为0导致多层MarkArea覆盖的问题

parent dbf08332
......@@ -22,7 +22,7 @@ path: /
## 单图表
<code src="./demos/index.js"></code>
[//]: # (<code src="./demos/index.js"></code>)
## 单图表-状态
......@@ -30,7 +30,7 @@ path: /
## 单图表-频率
[//]: # (<code src="./demos/indexForFrequency.js"></code>)
<code src="./demos/indexForFrequency.js"></code>
[//]: # '## 移动端'
[//]: # '<code src="./demos/mobile.js"></code>'
......
......@@ -161,10 +161,15 @@ const deviceParams = [
"deviceType": "送水泵"
}*/
/*界首*/
{
/* {
"deviceCode": "SYJ00000022",
"sensors": "IC",
"deviceType": "水源井"
}*/
{
"deviceCode": "JYJZ00000002",
"sensors": "频率,泵1状态",
"deviceType": "加压机组"
}
];
......
......@@ -3,9 +3,9 @@ import HistoryView from '../index';
const deviceParams2 = [
{
deviceCode:'EGJZ00000223',
sensors: '1#变频器运行频率',
deviceType: '二供机组',
"deviceCode": "JYJZ00000002",
"sensors": "频率",
"deviceType": "加压机组"
}
]
const Demo = () => {
......
......@@ -403,7 +403,7 @@ const handleSpecial1 = (special, dataSource) => {
let _pt = moment(cur.pt).valueOf();
let _length = final.length;
if (_colorMap[_valDesc[cur.pv]]) {
if (_length === 0) {
if (index === 0) {
final.push({
lte: _pt,
gte: 0,
......@@ -417,7 +417,7 @@ const handleSpecial1 = (special, dataSource) => {
} else {
final.push({
lte: _pt,
gte: final[_length - 1].gte,
gte: final[_length - 1].lte,
color: _colorMap[_valDesc[cur.pv]],
value: cur.pv,
text: _valDesc[cur.pv],
......
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