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
8c7dd0a4
Commit
8c7dd0a4
authored
Apr 20, 2023
by
陈龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修复被回退的代码
parent
3ec8e3f6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
18 additions
and
12 deletions
+18
-12
SingleChart.js
packages/extend-components/EC_HistoryView/src/SingleChart.js
+5
-0
GridDemo.js
...es/extend-components/EC_HistoryView/src/demos/GridDemo.js
+1
-1
index.js
packages/extend-components/EC_HistoryView/src/demos/index.js
+9
-8
index.js
packages/extend-components/EC_HistoryView/src/index.js
+0
-0
utils.js
packages/extend-components/EC_HistoryView/src/utils.js
+3
-3
No files found.
packages/extend-components/EC_HistoryView/src/SingleChart.js
View file @
8c7dd0a4
...
...
@@ -13,6 +13,9 @@ const SimgleChart = memo((props) => {
curveCenter
,
showGridLine
=
false
,
deviceAlarmSchemes
,
chartType
,
justLine
}
=
props
;
const
chartRef
=
useRef
();
...
...
@@ -24,6 +27,8 @@ const SimgleChart = memo((props) => {
deviceAlarmSchemes
,
showMarkLine
:
true
,
showPoint
:
true
,
chartType
,
justLine
};
return
optionGenerator
(
dataSource
,
null
,
contrast
,
contrastOption
,
smooth
,
config
);
},
[
dataSource
,
smooth
,
curveCenter
]);
...
...
packages/extend-components/EC_HistoryView/src/demos/GridDemo.js
View file @
8c7dd0a4
...
...
@@ -25,7 +25,7 @@ const deviceParams = [
const
Demo
=
()
=>
{
return
(
<
div
style
=
{{
height
:
700
}}
>
<
HistoryView
deviceParams
=
{
deviceParams
}
grid
/>
{
/*<HistoryView deviceParams={deviceParams} grid />*/
}
<
/div
>
);
};
...
...
packages/extend-components/EC_HistoryView/src/demos/index.js
View file @
8c7dd0a4
...
...
@@ -2,18 +2,19 @@ import React from 'react';
import
HistoryView
from
'../index'
;
const
deviceParams
=
[
// {
// deviceCode: 'EGBF00000146',
// sensors: '进水压力,出水瞬时流量,出水累计流量',
// deviceType: '二供泵房',
// pointAddressID: 4,
// },
{
deviceCode
:
'EGBF00000146'
,
sensors
:
'进水压力,出水瞬时流量,出水累计流量'
,
// deviceCode: 'EGBF00000002',
deviceCode
:
'EGBF00000082'
,
sensors
:
'进水压力'
,
deviceType
:
'二供泵房'
,
pointAddressID
:
4
,
},
{
deviceCode
:
'EGJZ00001113'
,
sensors
:
'出水瞬时流量,出水压力,泵1状态'
,
deviceType
:
'二供机组'
,
pointAddressID
:
4
,
},
// {
// deviceCode: 'EGJZ00001113',
// sensors: '出水压力',
...
...
packages/extend-components/EC_HistoryView/src/index.js
View file @
8c7dd0a4
This diff is collapsed.
Click to expand it.
packages/extend-components/EC_HistoryView/src/utils.js
View file @
8c7dd0a4
...
...
@@ -459,7 +459,7 @@ const optionGenerator = (dataSource, cusOption, contrast, contrastOption, smooth
let unit = ''
series = series.map(item => {
if (item.unit) unit = item.unit;
let _item = {...item, symbol:
null
};
let _item = {...item, symbol:
'none'
};
_item.data = _item?.data?.map(d => {
return d[1] || null
}) || [];
...
...
@@ -468,7 +468,7 @@ const optionGenerator = (dataSource, cusOption, contrast, contrastOption, smooth
series.push({
type: 'candlestick',
name: '箱线图',
symbol:
null
,
symbol:
'none'
,
data: otherData,
});
tooltip = tooltipAccessor(unit)
...
...
@@ -482,7 +482,7 @@ const optionGenerator = (dataSource, cusOption, contrast, contrastOption, smooth
}); //当存在othersData的时候,只是单曲线
xAxis = {type: 'category', data: series[0].data.map(item => moment(item[0]).format('YYYY-MM-DD'))};
series = series.map(item => {
let _item = {...item, symbol:
false
};
let _item = {...item, symbol:
'none'
};
_item.data = _item?.data?.map(d => {
return d[1] || null
}) || [];
...
...
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