value is the scale passed from the background. It is automatically generated. How to take the maximum and minimum value?
Code:
$.ajax ({
url : "gettable/"+tablename,
type : "get",
async : false, //
dataType : "json", //json
success : function(result) {
var arry1 = []
if (result) {
alert(result.max)
//option.xAxis[0]data
option.xAxis[0].data = [];
for (var i = 0; i < result.length; iPP) {
option.xAxis[0].data.push(result[i].date);
}
//option.series[0]data
option.series[0].data = [];
for (var i = 0; i < result.length; iPP) {
option.series[0].data.push(result[i].value);
if (result[i].value != null) {
countPP;
}
}
myChart.hideLoading(); //
myChart.setOption(option);
}
var data1 = result[count-1].date
var item = [
{
name: data1,
label: { show: true, position:"start" } ,
coord: [data1, 50]
},
{
coord: [data1, 0]
}
]
arry1.push(item)
option.series[0].markLine.data=arry1;
myChart.hideLoading(); //
myChart.setOption(option);
},
error : function(errorMsg) {
alert("!");
}
})