|
@@ -106,7 +106,7 @@
|
|
|
axisLabel: {
|
|
axisLabel: {
|
|
|
interval:0,
|
|
interval:0,
|
|
|
formatter: (v,i)=>{
|
|
formatter: (v,i)=>{
|
|
|
- return v
|
|
|
|
|
|
|
+ // return v
|
|
|
if(i===0){
|
|
if(i===0){
|
|
|
return 0;
|
|
return 0;
|
|
|
}
|
|
}
|
|
@@ -135,13 +135,13 @@
|
|
|
return v
|
|
return v
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
- // max:30,
|
|
|
|
|
|
|
+ max:140,
|
|
|
// min:0,
|
|
// min:0,
|
|
|
// interval:1,
|
|
// interval:1,
|
|
|
- // splitNumber:5,
|
|
|
|
|
- axisTick:{ //坐标轴刻度相关设置。
|
|
|
|
|
- show :true,
|
|
|
|
|
- },
|
|
|
|
|
|
|
+ splitNumber:7,
|
|
|
|
|
+ // axisTick:{ //坐标轴刻度相关设置。
|
|
|
|
|
+ // show :true,
|
|
|
|
|
+ // },
|
|
|
}],
|
|
}],
|
|
|
series: [{
|
|
series: [{
|
|
|
name: '最低气温',
|
|
name: '最低气温',
|
|
@@ -155,28 +155,28 @@
|
|
|
},
|
|
},
|
|
|
data: [{
|
|
data: [{
|
|
|
name: '1',
|
|
name: '1',
|
|
|
- yAxis: 1,
|
|
|
|
|
|
|
+ yAxis: 20,
|
|
|
lineStyle: {
|
|
lineStyle: {
|
|
|
color: '#ab6cef'
|
|
color: '#ab6cef'
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
name: '3',
|
|
name: '3',
|
|
|
- yAxis: 3,
|
|
|
|
|
|
|
+ yAxis: 40,
|
|
|
lineStyle: {
|
|
lineStyle: {
|
|
|
color: '#4caf50'
|
|
color: '#4caf50'
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
name: '5',
|
|
name: '5',
|
|
|
- yAxis: 5,
|
|
|
|
|
|
|
+ yAxis: 60,
|
|
|
lineStyle: {
|
|
lineStyle: {
|
|
|
color: '#AC4C44'
|
|
color: '#AC4C44'
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
name: '15',
|
|
name: '15',
|
|
|
- yAxis: 15,
|
|
|
|
|
|
|
+ yAxis: 80,
|
|
|
lineStyle: {
|
|
lineStyle: {
|
|
|
color: '#AC4C44'
|
|
color: '#AC4C44'
|
|
|
}
|
|
}
|
|
@@ -371,13 +371,34 @@
|
|
|
// 3.寻找 min_v 所在的下标
|
|
// 3.寻找 min_v 所在的下标
|
|
|
const index = this.dataInterval.findIndex((v) => v === min_v);
|
|
const index = this.dataInterval.findIndex((v) => v === min_v);
|
|
|
// 4.计算该amount在y轴上应该展示的位置
|
|
// 4.计算该amount在y轴上应该展示的位置
|
|
|
- const y_value = ((yxlData[i] - min_v) / (max_v - min_v)) * 10 + index * 10;
|
|
|
|
|
|
|
+ // const y_value = ((yxlData[i] - min_v) / (max_v - min_v)) * 20 + index * 20;
|
|
|
|
|
+
|
|
|
|
|
+ let y_value = yxlData[i];
|
|
|
|
|
+ if(y_value>=0 & y_value<=20){
|
|
|
|
|
+ y_value = y_value/20*y_value
|
|
|
|
|
+ }
|
|
|
|
|
+ if(y_value>20 & y_value<=40){
|
|
|
|
|
+ y_value = y_value/40*y_value
|
|
|
|
|
+ // y_value = 1+(y_value-20)/20*y_value
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+ if(y_value>40 & y_value<=60){
|
|
|
|
|
+ y_value = y_value/60*y_value
|
|
|
|
|
+ // y_value = 3 + (y_value-40)/20*y_value
|
|
|
|
|
+ }
|
|
|
|
|
+ if(y_value>60 & y_value<=80){
|
|
|
|
|
+ y_value = y_value/80*y_value
|
|
|
|
|
+ // y_value = 5 + (y_value-60)/20*y_value
|
|
|
|
|
+ }
|
|
|
|
|
+ if(y_value>80 & y_value<=100){
|
|
|
|
|
+ y_value = y_value/100*y_value
|
|
|
|
|
+ }
|
|
|
yxlData2[i] = y_value;
|
|
yxlData2[i] = y_value;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
console.log(yxlData2,2222222222222)
|
|
console.log(yxlData2,2222222222222)
|
|
|
- this.pklineOption.series[0].data = res.data.data.pk_ydata
|
|
|
|
|
- // this.pklineOption.series[0].data = yxlData2
|
|
|
|
|
|
|
+ // this.pklineOption.series[0].data = res.data.data.pk_ydata
|
|
|
|
|
+ this.pklineOption.series[0].data = yxlData2
|
|
|
// this.yxlData2 = yxlData2
|
|
// this.yxlData2 = yxlData2
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|