Commit 8c7dd0a4 authored by 陈龙's avatar 陈龙

fix: 修复被回退的代码

parent 3ec8e3f6
......@@ -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]);
......
......@@ -25,7 +25,7 @@ const deviceParams = [
const Demo = () => {
return (
<div style={{ height: 700 }}>
<HistoryView deviceParams={deviceParams} grid />
{/*<HistoryView deviceParams={deviceParams} grid />*/}
</div>
);
};
......
......@@ -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: '出水压力',
......
......@@ -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
}) || [];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment