Home Forums StockChart Support 1 Day difference in the start date in the Range Selector and the data provided

1 Day difference in the start date in the Range Selector and the data provided

  • #44004

    For example, In CanvasJS Stockchart start date is coming “2020-04-30T23:30:00+09:30” in Start date RangeSelector but my first data is “2020-05-01T00:00:00+09:30”.
    It seems there is a difference of 1 day in the First data and the Start date of RANGE SELECTOR.

    To resolve this I had used minimum in x-axis but when there is change in Range Selector then minimum does not work and start date get reset.

    Please look into this and let me know if anything required from my side.

    Regards

    #44011

    @indxx,

    The range of charts in the stockchart is automatically calculated based on data being passed to navigator. To start the range of stockchart from first datapoint, you can set the minimum property of axisX in navigator to first datapoint as shown in the code snippet below.

    navigator: {
         axisX:{
             minimum: new Date(2018,0,1)
         }
    }

    Kindly take a look at this JSFiddle for working code.

    __
    Sachin Bisht
    Team CanvasJS

You must be logged in to reply to this topic.