get the min and max value of y-axes in flot chart -


i using flot chart plot charts. min , max value of y-axis getting set itself(autoscale). want retrieve min , max value of y-axis , post in text boxes.i used following code, not working.

$.plot($("#placehoder"),dataset,options); var a=plot.getoptions().yaxes[0].min; alert(a); 

you try access variable plot have not set before, change code , should work:

var plot = $.plot($("#placehoder"), dataset, options); var = plot.getoptions().yaxes[0].min; alert(a); 

Comments