How to get the maximum scale value of the echarts axis?

markLine: {

symbol : "none",
lineStyle: {
    normal: {
        type: "dashed",
        color:"-sharpccc"
    }
},
data : [
    {yAxis :arrMaxNum(arrX)/2},
    { xAxis:arrMaxNum(arrY)/2 }
]

},
want to add a central axis, but this maximum coordinate value cannot be the largest in the array. So I"d like to ask how to get the maximum value of the scale?

May.30,2021

echartsInstance.getModel().getComponent('yAxis').axis.extent

add
if you just want to add the central axis, the method is as follows:

method 1: set the maximum and minimum value of the axis in the configuration item, and then draw the central axis.
method 2: set the splitLine of the axis to an even number in the configuration item, and then draw it through splitLine.interval or splitLine.lineStyle.color (raba transparent color).
method 3: first setOption, then obtain the extreme value of the axis through echartsInstance.getModel (). GetComponent ('yAxis') .axis.extent, and then re-fill in the data in markLine and setOption again.

Menu