Home forums Using CanvasJS axisXMax

Tagged: 

This topic contains 5 replies, has 2 voices, and was last updated by  James 11 months, 1 week ago.

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

    James
    Member

    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

    Indranil Deo
    Member

    James,

    Please take a look at this updated jsfiddle.

    ___________
    Indranil Deo,
    Team CanvasJS

    • This reply was modified 11 months, 1 week ago by  Indranil Deo.
    #18579

    James
    Member

    Thank you for the fast response!

    #18580

    James
    Member

    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

    Indranil Deo
    Member

    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

    James
    Member

    thank you!

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

You must be logged in to reply to this topic.