Home Forums Chart Support Set view with X axis

Set view with X axis

Viewing 3 posts - 1 through 3 (of 3 total)
  • #7214

    Hi everyone !

    I play some couple of day with CanvaJS, I wonderering if I could create a selectbox to pan to some default value like : Last hour, last day, last month. Yep, my X axis is datetime format.

    Thank you !

    #7215

    well, I finally did what I want, but there is anoying things
    I set minimum and maximum like minimum : new Date (2014,….)
    It’s work, but I can’t zoom inside this selection.
    Worse, when I zoom into, 2 icons appears, but using pan icon erase all chart.
    Is there better than minimum/maximum to set prefered section, allowing to zoom in and zoom out ?

    Thank you.

    #7224

    As of now setting minimum/maximum is the only way.

    I set minimum and maximum like minimum : new Date (2014,….)
    It’s work, but I can’t zoom inside this selection.

    This is a bug and we’ll fix the issue in the next release. But we do have a workaround though. Setting timestamp instead of date object works fine. Below is the code snippet.

    axisX: {
        minimum: (new Date(2002,00,1)).getTime(),
        maximum: (new Date(2002,00,20)).getTime()
    }


    Anjali Jain

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

You must be logged in to reply to this topic.