Commit 4552dff4 authored by 陈龙's avatar 陈龙

fix: 修复x轴显示时间异常;修复分隔线显示异常

parent 4f4ae454
......@@ -11,7 +11,7 @@ const SimgleChart = memo((props) => {
contrastOption = 'day',
smooth = true,
curveCenter,
showGridLine = false,
showGridLine = true,
deviceAlarmSchemes,
chartType,
justLine
......
......@@ -11,11 +11,11 @@ const deviceParams = [
{
// deviceCode: 'EGBF00000002',
// deviceCode: 'EGBF00000018',
deviceCode: 'EGBF00000017',
deviceCode: 'XMYL00000345',
// deviceCode: 'EGBF00000014',
// sensors: '今日供水量,今日用电量,1#水箱液位,是否在线',
sensors: '今日供水量',
deviceType: '二供泵房',
sensors: '进水压力',
deviceType: '熊猫压力表',
pointAddressID: 4,
},
// {
......
......@@ -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', false);
const showGridLine = _.get(config, 'showGridLine', true);
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 => {
......
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