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
05541f08
Commit
05541f08
authored
Sep 19, 2023
by
陈龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 优化历史曲线显示
parent
bb66166f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
7 deletions
+8
-7
EC_HistoryView.md
...es/extend-components/EC_HistoryView/src/EC_HistoryView.md
+1
-1
index.js
packages/extend-components/EC_HistoryView/src/demos/index.js
+3
-3
utils.js
packages/extend-components/EC_HistoryView/src/utils.js
+4
-3
No files found.
packages/extend-components/EC_HistoryView/src/EC_HistoryView.md
View file @
05541f08
...
...
@@ -30,7 +30,7 @@ path: /
## 多图表
<
!-- <code src="./demos/GridDemo.js"></code>
--
>
<
code
src=
"./demos/GridDemo.js"
></code
>
## API
...
...
packages/extend-components/EC_HistoryView/src/demos/index.js
View file @
05541f08
...
...
@@ -63,7 +63,7 @@ const deviceParams = [
"sensors"
:
"瞬时流量"
,
"deviceType"
:
"水厂"
},
{
/*
{
"deviceCode": "JFJ00000001",
"sensors": "沉淀池投矾量瞬时,",
"deviceType": "加矾间"
...
...
@@ -88,12 +88,12 @@ const deviceParams = [
"sensors": "瞬时流量",
"deviceType": "流量计"
},
/
*邳州*
/
/
!*邳州*!
/
{
deviceCode: 'EGJZ00000027',
sensors: '2#变频器运行频率',
deviceType: '二供机组',
},
},
*/
/*确山*/
/*泵3状态*/
/* {
...
...
packages/extend-components/EC_HistoryView/src/utils.js
View file @
05541f08
...
...
@@ -634,9 +634,9 @@ const handleDefault = (config, cusOption) => {
};
};
const handleMaxValue = (value) => {
if (value <= 1) return value;
if (value >= 10000) return `
$
{(
value
/
1000
).
toFixed
(
0
)}
k
`;
return value.toFixed(
0
);
if (value <= 1) return value
.toFixed(2)
;
if (value >= 10000) return `
$
{(
value
/
1000
).
toFixed
(
1
)}
k
`;
return value.toFixed(
1
);
}
const handleYAxis = ({ dataSource, needUnit, curveCenter, showGridLine }) => {
// 一种指标一个y轴
...
...
@@ -790,6 +790,7 @@ const handleGrid = (dataSource, needUnit, leftNum, rightNum, chartType) => {
top: _base + _topForUnit,
// left: leftNum === 1 ? 10 : leftNum * AXIS_WIDTH,
left: 10,
right:10,
// right: rightNum === 0 ? 20 : rightNum * AXIS_WIDTH,
bottom: 60,
containLabel: true,
...
...
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