Home Forums Chart Support axisXMax


Viewing 6 posts - 1 through 6 (of 6 total)
  • #18575

    I have an axisXMax value in the format (axisXMax, “D MMM YYYY”).
    For (axisXMin, “D MMM YYYY”) I would need the Values “axisXMax minus “number of days”, how can I do this?

    The purpose is to start a chart with a specific length of 1 week, 10 days or something else.
    rest will be done with a date picker.




    Please take a look at this updated jsfiddle.

    Indranil Deo,
    Team CanvasJS

    • This reply was modified 6 years, 6 months ago by Indranil.

    Thank you for the fast response!


    I see you have used:

    minValue.setMonth(minValue.getMonth() – 1);

    is there also function for “week” and “day” available, like:
    minValue.setWeek(minValue.getWeek() – 2);

    Thank you



    getDate(), getDay(), getMonth() are Javascript Date Methods. For more info on Javascript Date Methods please take a look at this tutorial.

    Indranil Deo,
    Team CanvasJS


    thank you!

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

You must be logged in to reply to this topic.