Home Forums Chart Support Axis-Y stripLines autoscale Reply To: Axis-Y stripLines autoscale



Axis range is calculated according to the datapoint values and not the striplines. So if the stripline value is more than that of the axis range, it won’t be shown in the plot-area. In this scenario, you can dynamically set the axis range to show stripline with the help of set method as shown below –

chart.axisY[0].set("maximum", chart.axisY[0].stripLines[0].get("value") + chart.axisY[0].get("interval"));

Kindly take a look at this JSFiddle for a working example with complete code.

Auto calculate axis range based on stripline value

Indranil Singh Deo
Team CanvasJS