problem description
the requirement is that there is a set of data data,dat.x is x-axis time Abscissa, data.y is y-axis data,data.y vertical range fluctuates up and down 1. Now it is necessary to change the y-coordinate of the origin coordinate of the graph to start with 1, the part exceeding 1 is above the x-axis, and the lower than 1 is just below the x-axis. The current graph is as follows
the environmental background of the problems and what methods you have tried
< hr >
related codes
/ / Please paste the code text below (do not replace the code with pictures)
var option = {
tooltip: {
trigger: "axis",
},
xAxis : [ {
show:true,
type: "category",
boundaryGap: false,
axisLine:{
show:true,
},
axisTick:{
show:false
},
axisLabel:{
show:false
},
splitLine:{
show:false,
},
data : strategyInfo.x
} ],
yAxis : [{
show : true,
axisLine : {
show : true,
lineStyle : {
color : "-sharpbae1e5"
}
},
scale: true,
axisTick : {
show : true
},
axisLabel:{
show:true
},
position : "left",
type : "value",
boundaryGap : [ 0, "15%" ],
splitLine : {
show : false,
interval : 1000,
lineStyle : {
color : "-sharpbae1e5"
}
},
}],
series : [ {
name : "",
type : "line",
xAxisIndex : 0,
yAxisIndex : 0,
data : strategyInfo.y,
smooth : true,
symbol : "none",
sampling : "average",
itemStyle : {
normal : {
color : "rgb(164, 215, 220)"
}
},
areaStyle : {
normal : {
color : "rgb(164, 215, 220)"
}
},
} ]
};