Commit cf376333 authored by xinzhedeai's avatar xinzhedeai

详情内页,图表坐标值max min设置

parent 991c7e3b
......@@ -399,11 +399,13 @@
const result = res.data.body;
if (result) {
const max = result.max
const min = result.min
if(max){
chartsOption.yAxis[0].max = max
chartsOption.yAxis[0].min = -max
chartsOption.yAxis[0].min = min || -5
chartsOption.yAxis[1].max = max
chartsOption.yAxis[1].min = -max
chartsOption.yAxis[1].min = min || -5
}
chartsOption.xAxis.data = result.xData.data
......
......@@ -266,7 +266,7 @@
show: true
},
axisTick: { show: true },
min: -20,
// min: -20,
max: 50,
title: {
text: 'Precipitation', // 这是你的 Y 轴标题
......@@ -290,7 +290,7 @@
show: true
},
axisTick: { show: true },
min: -20,
// min: -20,
max: 50,
}],
grid: { right: 45, top: 10, left: 40, bottom: 25 },
......@@ -331,11 +331,12 @@
if (result) {
const max = result.max // 必返
const min = result.min // 必返
if(max){
chartsOption.yAxis[0].max = max
chartsOption.yAxis[0].min = -20
chartsOption.yAxis[0].min = min || -5
chartsOption.yAxis[1].max = max
chartsOption.yAxis[1].min = -20
chartsOption.yAxis[1].min = min || -5
}
chartsOption.xAxis.data = result.xData.data
......
......@@ -333,6 +333,14 @@
}).then(res => {
const result = res.data.body;
if (result) {
const max = result.max // 必返
const min = result.min // 必返
if(max){
chartsOption.yAxis[0].max = max
chartsOption.yAxis[1].max = max
}
chartsOption.xAxis.data = result.xData.data
chartsOption.series = result.yData.map((item, index) => {
if(index===0){
......
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