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
5c7320b8
Commit
5c7320b8
authored
Sep 19, 2023
by
陈龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 优化历史曲线显示
parent
bc1f77da
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
11 deletions
+15
-11
index.js
packages/extend-components/EC_HistoryView/src/demos/index.js
+12
-8
utils.js
packages/extend-components/EC_HistoryView/src/utils.js
+3
-3
No files found.
packages/extend-components/EC_HistoryView/src/demos/index.js
View file @
5c7320b8
...
...
@@ -11,7 +11,7 @@ const deviceParams = [
deviceType: '熊猫二供泵房',
pointAddressID: 208,
}, */
/*
{
/*
{
"deviceCode": "SYJ00000008",
"sensors": "瞬时流量",
"deviceType": "水源井"
...
...
@@ -41,12 +41,12 @@ const deviceParams = [
deviceType: '熊猫压力表',
pointAddressID: 4,
},*/
{
/*
{
deviceCode: 'EGJZ00000226',
sensors: '出水压力',
deviceType: '二供机组',
pointAddressID: 4,
},
}, */
/* {
"deviceCode": "LLJ00000055",
"sensors": "正累计流量,瞬时流量",
...
...
@@ -58,12 +58,12 @@ const deviceParams = [
"deviceType": "二供机组"
}*/
// 邳州张楼水厂
{
/*
{
"deviceCode": "SC00000023",
"sensors": "瞬时流量",
"deviceType": "水厂"
},
/*
{
}, */
{
"deviceCode"
:
"JFJ00000001"
,
"sensors"
:
"沉淀池投矾量瞬时,"
,
"deviceType"
:
"加矾间"
...
...
@@ -88,12 +88,11 @@ const deviceParams = [
"sensors"
:
"瞬时流量"
,
"deviceType"
:
"流量计"
},
/!*邳州*!/
{
deviceCode
:
'EGJZ00000027'
,
sensors
:
'2#变频器运行频率'
,
deviceType
:
'二供机组'
,
},*/
},
/*确山*/
/*泵3状态*/
/* {
...
...
@@ -102,6 +101,11 @@ const deviceParams = [
// sensors: '3#频率',
sensors: '出1累计流量',
deviceType: '二供机组',
}, */
/* {
"deviceCode": "EGBF00000006",
"sensors": "出1累计流量",
"deviceType": "二供泵房"
} */
];
const
Demo
=
()
=>
{
...
...
packages/extend-components/EC_HistoryView/src/utils.js
View file @
5c7320b8
...
...
@@ -635,8 +635,8 @@ const handleDefault = (config, cusOption) => {
};
const handleMaxValue = (value) => {
if (value <= 1) return value.toFixed(2);
if (value >= 10000
) return `
$
{(
value
/
1000
).
toFixed
(
1
)}
k
`;
return value.toFixed(
1
);
if (value >= 10000
0) return `
$
{(
value
/
1000
).
toFixed
(
2
)}
k
`;
return value.toFixed(
2
);
}
const handleYAxis = ({ dataSource, needUnit, curveCenter, showGridLine }) => {
// 一种指标一个y轴
...
...
@@ -789,7 +789,7 @@ const handleGrid = (dataSource, needUnit, leftNum, rightNum, chartType) => {
return {
top: _base + _topForUnit,
// left: leftNum === 1 ? 10 : leftNum * AXIS_WIDTH,
left:
1
0,
left:
2
0,
right:10,
// right: rightNum === 0 ? 20 : rightNum * AXIS_WIDTH,
bottom: 60,
...
...
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