Home Forums Chart Support axisXMax

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.

    Thanks!

    #18576

    James,

    Please take a look at this updated jsfiddle.

    ___________
    Indranil Deo,
    Team CanvasJS

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

    Thank you for the fast response!

    #18580

    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

    #18582

    James,

    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

    #18585

    thank you!

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

You must be logged in to reply to this topic.