NEZ-1330 fix: Panel选择图表内单条数据查看时,图表显示错误
This commit is contained in:
@@ -436,11 +436,23 @@ export default {
|
|||||||
// const dot = maxValueCopies.dot
|
// const dot = maxValueCopies.dot
|
||||||
const copies = maxValueCopies.copies
|
const copies = maxValueCopies.copies
|
||||||
const unit = maxValueCopies.unit
|
const unit = maxValueCopies.unit
|
||||||
getChart(this.chartIndex).setOption({
|
const option = {
|
||||||
yAxis: {
|
yAxis: {
|
||||||
minInterval: chartDataFormat.Interval(maxValue, copies, unit.type, 'min'),
|
minInterval: chartDataFormat.Interval(maxValue, copies, unit.type, 'min'),
|
||||||
maxInterval: chartDataFormat.Interval(maxValue, copies, unit.type, 'max') * Math.ceil(dataArg.length / 5)
|
maxInterval: chartDataFormat.Interval(maxValue, copies, unit.type, 'max') * Math.ceil(dataArg.length / 5)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
if (!maxValueCopies.copies) {
|
||||||
|
option.yAxis.min = 0
|
||||||
|
option.yAxis.max = 1
|
||||||
|
}
|
||||||
|
if (unit.type == 'Time' || option.yAxis.maxInterval === 1) {
|
||||||
|
delete option.yAxis.maxInterval
|
||||||
|
}
|
||||||
|
getChart(this.chartIndex).setOption({
|
||||||
|
yAxis: {
|
||||||
|
...option.yAxis
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -538,11 +550,23 @@ export default {
|
|||||||
// const dot = maxValueCopies.dot
|
// const dot = maxValueCopies.dot
|
||||||
const copies = maxValueCopies.copies
|
const copies = maxValueCopies.copies
|
||||||
const unit = maxValueCopies.unit
|
const unit = maxValueCopies.unit
|
||||||
echart.setOption({
|
const option = {
|
||||||
yAxis: {
|
yAxis: {
|
||||||
minInterval: chartDataFormat.Interval(maxValue, copies, unit.type, 'min'),
|
minInterval: chartDataFormat.Interval(maxValue, copies, unit.type, 'min'),
|
||||||
maxInterval: chartDataFormat.Interval(maxValue, copies, unit.type, 'max') * Math.ceil(dataArg.length / 5)
|
maxInterval: chartDataFormat.Interval(maxValue, copies, unit.type, 'max') * Math.ceil(dataArg.length / 5)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
if (!maxValueCopies.copies) {
|
||||||
|
option.yAxis.min = 0
|
||||||
|
option.yAxis.max = 1
|
||||||
|
}
|
||||||
|
if (unit.type == 'Time' || option.yAxis.maxInterval === 1) {
|
||||||
|
delete option.yAxis.maxInterval
|
||||||
|
}
|
||||||
|
echart.setOption({
|
||||||
|
yAxis: {
|
||||||
|
...option.yAxis
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -659,6 +683,7 @@ export default {
|
|||||||
const copies = maxValueCopies.copies
|
const copies = maxValueCopies.copies
|
||||||
const unit = maxValueCopies.unit
|
const unit = maxValueCopies.unit
|
||||||
const oldDot = maxValueCopies.oldDot
|
const oldDot = maxValueCopies.oldDot
|
||||||
|
console.log(maxValueCopies, chartDataFormat.Interval(maxValue, copies, unit.type, 'min'), chartDataFormat.Interval(maxValue, copies, unit.type, 'max') * Math.ceil(dataArg.length / 5))
|
||||||
let option = {
|
let option = {
|
||||||
title: {
|
title: {
|
||||||
show: false
|
show: false
|
||||||
@@ -1879,12 +1904,24 @@ export default {
|
|||||||
const copies = maxValueCopies.copies
|
const copies = maxValueCopies.copies
|
||||||
const unit = maxValueCopies.unit
|
const unit = maxValueCopies.unit
|
||||||
// const oldDot = maxValueCopies.oldDot
|
// const oldDot = maxValueCopies.oldDot
|
||||||
getChart(this.chartIndex).setOption({
|
const option = {
|
||||||
series: this.seriesItem,
|
|
||||||
yAxis: {
|
yAxis: {
|
||||||
minInterval: chartDataFormat.Interval(maxValue, copies, unit.type, 'min'),
|
minInterval: chartDataFormat.Interval(maxValue, copies, unit.type, 'min'),
|
||||||
maxInterval: chartDataFormat.Interval(maxValue, copies, unit.type, 'max') * Math.ceil(dataArg.length / 5)
|
maxInterval: chartDataFormat.Interval(maxValue, copies, unit.type, 'max') * Math.ceil(dataArg.length / 5)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
if (!maxValueCopies.copies) {
|
||||||
|
option.yAxis.min = 0
|
||||||
|
option.yAxis.max = 1
|
||||||
|
}
|
||||||
|
if (unit.type == 'Time' || option.yAxis.maxInterval === 1) {
|
||||||
|
delete option.yAxis.maxInterval
|
||||||
|
}
|
||||||
|
getChart(this.chartIndex).setOption({
|
||||||
|
series: this.seriesItem,
|
||||||
|
yAxis: {
|
||||||
|
...option.yAxis
|
||||||
|
}
|
||||||
})
|
})
|
||||||
if (this.hasLegendOptions) {
|
if (this.hasLegendOptions) {
|
||||||
this.computeLegendData(this.legendListMore, this.seriesItemArr, 'local')
|
this.computeLegendData(this.legendListMore, this.seriesItemArr, 'local')
|
||||||
@@ -1912,12 +1949,24 @@ export default {
|
|||||||
const copies = maxValueCopies.copies
|
const copies = maxValueCopies.copies
|
||||||
const unit = maxValueCopies.unit
|
const unit = maxValueCopies.unit
|
||||||
// const oldDot = maxValueCopies.oldDot
|
// const oldDot = maxValueCopies.oldDot
|
||||||
this.echartModalStore.setOption({
|
const option = {
|
||||||
series: this.seriesItemScreen,
|
|
||||||
yAxis: {
|
yAxis: {
|
||||||
minInterval: chartDataFormat.Interval(maxValue, copies, unit.type, 'min'),
|
minInterval: chartDataFormat.Interval(maxValue, copies, unit.type, 'min'),
|
||||||
maxInterval: chartDataFormat.Interval(maxValue, copies, unit.type, 'max') * Math.ceil(dataArg.length / 5)
|
maxInterval: chartDataFormat.Interval(maxValue, copies, unit.type, 'max') * Math.ceil(dataArg.length / 5)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
if (!maxValueCopies.copies) {
|
||||||
|
option.yAxis.min = 0
|
||||||
|
option.yAxis.max = 1
|
||||||
|
}
|
||||||
|
if (unit.type == 'Time' || option.yAxis.maxInterval === 1) {
|
||||||
|
delete option.yAxis.maxInterval
|
||||||
|
}
|
||||||
|
this.echartModalStore.setOption({
|
||||||
|
series: this.seriesItemScreen,
|
||||||
|
yAxis: {
|
||||||
|
...option.yAxis
|
||||||
|
}
|
||||||
})
|
})
|
||||||
if (this.hasLegendOptions) {
|
if (this.hasLegendOptions) {
|
||||||
this.computeLegendData(this.screenLegendListMore, this.seriesItemArrScreen, 'screen')
|
this.computeLegendData(this.screenLegendListMore, this.seriesItemArrScreen, 'screen')
|
||||||
|
|||||||
Reference in New Issue
Block a user