Home forums Using CanvasJS Y axis range & Zoom Functionality Reply To: Y axis range & Zoom Functionality

#7176

SwapnilV007
Participant

Hi,

I tried below mentioned API that can be used to change Y-min and Y-max when zooming:

chart.options.axisY.minimum = null;
chart.options.axisY.maximum = null;

When I dont set the minimum and maximum values of Y axis then graph automatically calculates the min and max values depending on the zoomed portion. That means it has this intelligence built in to decide the min and max values depending on zoomed portion.

Can I get these values and directly use these returned values in above mentioned api’s so that zooming scales the Y axis.
Currently It is able to scale Y axis when zoomed but as I am passing “null” value to above API’s; the scaling range is always -5 to 5.

Thanks,
Swapnil