Home Forums StockChart Support How to set axis X padding-right

How to set axis X padding-right

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

    when useing chart , not stock chart library , it works using axisX viewportMaximum options for setting axis X padding ,
    but it doesn’t work at stockchart library .
    please tell me how to set :)

    #61563

    @p42510,

    In CanvasJS StockChart, the navigator range takes priority over the chart’s range, meaning the chart’s range can’t extend beyond the navigator’s range. As a result, adding padding using viewportMaximum doesn’t work directly. To add padding, you can extend the navigator’s range by inserting null data points before the first and after the last data point. This way, you can simulate padding and ensure the chart has some space around the visible data.

    Please take a look at this CodePen example for a working example of the same.

    canvasjs stockchart with padding in axis-x


    Vishwas R
    Team CanvasJS

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

You must be logged in to reply to this topic.