Commit da94e314 authored by 陈龙's avatar 陈龙

feat: 发布历史曲线

parent 35781475
...@@ -576,14 +576,12 @@ const returnMaxOrMinNumber = (dataSource, type) => { ...@@ -576,14 +576,12 @@ const returnMaxOrMinNumber = (dataSource, type) => {
_obj = item _obj = item
} }
} }
;
if (type === 'max') { if (type === 'max') {
if (item.pv > _obj.pv) { if (item.pv > _obj.pv) {
_obj = item _obj = item
} }
} }
} }
}); });
let _value = [moment(_obj.pt).valueOf(), _obj.pv]; let _value = [moment(_obj.pt).valueOf(), _obj.pv];
let _img = type === 'max' ? maxIcon : minIcon; let _img = type === 'max' ? maxIcon : minIcon;
...@@ -596,10 +594,9 @@ const handleGrid = (dataSource, needUnit, leftNum, rightNum, chartType) => { ...@@ -596,10 +594,9 @@ const handleGrid = (dataSource, needUnit, leftNum, rightNum, chartType) => {
// 如果是单曲线,_grid的top需要一行的高度,用来放置最值最小值 // 如果是单曲线,_grid的top需要一行的高度,用来放置最值最小值
let _base = 60; let _base = 60;
let _topForUnit = needUnit ? 20 : 0; let _topForUnit = needUnit ? 20 : 0;
let _topForValue = chartType && dataSource.length === 1 ? 50 : 0 let _topForValue = chartType && dataSource.length === 1 ? 50 : 0;
return { return {
top: _base + _topForUnit + _topForValue, top: _base + _topForUnit + _topForValue,
// top: 200,
left: 30 + leftNum * AXIS_WIDTH, left: 30 + leftNum * AXIS_WIDTH,
right: rightNum === 0 ? 40 : rightNum * AXIS_WIDTH, right: rightNum === 0 ? 40 : rightNum * AXIS_WIDTH,
bottom: 60, bottom: 60,
...@@ -660,7 +657,6 @@ const returnCustomSeries = (dataSource) => { ...@@ -660,7 +657,6 @@ const returnCustomSeries = (dataSource) => {
type: 'custom', type: 'custom',
renderItem: renderItem, renderItem: renderItem,
data: [_maxNumber, _minNumber], data: [_maxNumber, _minNumber],
// yAxisIndex:2
} }
}; };
/** /**
......
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