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
4552dff4
Commit
4552dff4
authored
May 10, 2023
by
陈龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修复x轴显示时间异常;修复分隔线显示异常
parent
4f4ae454
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
7 deletions
+9
-7
SingleChart.js
packages/extend-components/EC_HistoryView/src/SingleChart.js
+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
+5
-3
No files found.
packages/extend-components/EC_HistoryView/src/SingleChart.js
View file @
4552dff4
...
...
@@ -11,7 +11,7 @@ const SimgleChart = memo((props) => {
contrastOption
=
'day'
,
smooth
=
true
,
curveCenter
,
showGridLine
=
fals
e
,
showGridLine
=
tru
e
,
deviceAlarmSchemes
,
chartType
,
justLine
...
...
packages/extend-components/EC_HistoryView/src/demos/index.js
View file @
4552dff4
...
...
@@ -11,11 +11,11 @@ const deviceParams = [
{
// deviceCode: 'EGBF00000002',
// deviceCode: 'EGBF00000018',
deviceCode
:
'
EGBF00000017
'
,
deviceCode
:
'
XMYL00000345
'
,
// deviceCode: 'EGBF00000014',
// sensors: '今日供水量,今日用电量,1#水箱液位,是否在线',
sensors
:
'
今日供水量
'
,
deviceType
:
'
二供泵房
'
,
sensors
:
'
进水压力
'
,
deviceType
:
'
熊猫压力表
'
,
pointAddressID
:
4
,
},
// {
...
...
packages/extend-components/EC_HistoryView/src/utils.js
View file @
4552dff4
...
...
@@ -252,7 +252,7 @@ const optionGenerator = (dataSource, cusOption, contrast, contrastOption, smooth
const
needUnit
=
_
.
get
(
config
,
'needUnit'
,
false
);
const
curveCenter
=
_
.
get
(
config
,
'curveCenter'
,
false
);
const
nameWithSensor
=
_
.
get
(
config
,
'nameWithSensor'
,
true
);
const
showGridLine
=
_
.
get
(
config
,
'showGridLine'
,
fals
e
);
const
showGridLine
=
_
.
get
(
config
,
'showGridLine'
,
tru
e
);
const
showMarkLine
=
_
.
get
(
config
,
'showMarkLine'
,
false
);
const
showPoint
=
_
.
get
(
config
,
'showPoint'
,
false
);
const
deviceAlarmSchemes
=
_
.
get
(
config
,
'deviceAlarmSchemes'
,
[]);
...
...
@@ -468,7 +468,8 @@ const optionGenerator = (dataSource, cusOption, contrast, contrastOption, smooth
const {firstPV, lastPV, maxPV, minPV} = item;
return [firstPV, lastPV, minPV, maxPV]
}) || []; //当存在othersData的时候,只是单曲线
xAxis = {type: 'category', data: series[0].data.map(item => moment(item[0]).format('YYYY-MM-DD'))};
xAxis = {type: 'category', data: series[0].data.map(item => moment(item[0]).format('YYYY-MM-DD HH:mm:ss'))};
decorateAxisGridLine(xAxis, showGridLine);
let unit = ''
series = series.map(item => {
if (item.unit) unit = item.unit;
...
...
@@ -499,7 +500,8 @@ const optionGenerator = (dataSource, cusOption, contrast, contrastOption, smooth
_maxData.push(maxPV);
_minData.push(minPV);
}); //当存在othersData的时候,只是单曲线
xAxis = {type: 'category', data: series[0].data.map(item => moment(item[0]).format('YYYY-MM-DD'))};
xAxis = {type: 'category', data: series[0].data.map(item => moment(item[0]).format('YYYY-MM-DD HH:mm:ss'))};
decorateAxisGridLine(xAxis, showGridLine);
series = series.map(item => {
let _item = {...item, symbol: 'none'};
_item.data = _item?.data?.map(d => {
...
...
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