Home Forums Chart Support Axis-Y stripLines autoscale

Axis-Y stripLines autoscale

Viewing 2 posts - 1 through 2 (of 2 total)
  • #36712

    The y-axis does not auto-resize to display the the stripLines. I have to set maximum e minimum manually.

    #36720

    @maurizio-fanigliulo,

    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

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.