Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wisdom-components
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ReactWeb5
wisdom-components
Commits
42e68f08
Commit
42e68f08
authored
Nov 29, 2023
by
陈龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:修复历史曲线在全部为异常值时,显示最大最小值异常的问题
parent
9622dd3a
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
4 deletions
+12
-4
index.js
packages/extend-components/EC_HistoryView/src/demos/index.js
+8
-3
utils.js
packages/extend-components/EC_HistoryView/src/utils.js
+4
-1
No files found.
packages/extend-components/EC_HistoryView/src/demos/index.js
View file @
42e68f08
...
...
@@ -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
=
()
=>
{
...
...
packages/extend-components/EC_HistoryView/src/utils.js
View file @
42e68f08
...
...
@@ -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,9 +1155,11 @@ const optionGenerator = (
let
_dataSource
=
dataSource
?.
filter
((
item
)
=>
item
?.
dataModel
?.
length
);
if
(
_dataSource
?.
length
)
{
let
_customSeries
=
returnCustomSeries
(
dataSource
);
if
(
_customSeries
)
{
series
.
push
(
_customSeries
);
}
}
}
}
else
{
tooltip
=
tooltipAccessor
(
series
.
map
((
item
)
=>
item
.
unit
),
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment