Home forums Using CanvasJS How to Plot Complete Date and Time On X axis

This topic contains 8 replies, has 2 voices, and was last updated by  SwapnilV007 2 years, 2 months ago.

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #7010

    SwapnilV007
    Participant

    Hi,

    I am trying to plot date and time on X axis. I am able to do so using “labels”. But I dont want to show date and time in single line. Instead I want to show Date on 1 line and below that date corresponding time. Is there a way to do it?
    Please let me know if there is any solution to do so.

    Thanks,
    Swapnil

    #7019

    Anjali
    Participant

    Hi,

    You can do so by using labelMaxWidth property which allows you to set the maximum width of label as required.Here is a jsfiddle can help you.


    Anjali

    #7025

    SwapnilV007
    Participant

    Hi Anjali,

    Thanks for your reply.
    Setting labelMaxWidth solved my problem.
    But now I see another issue. The last Label on X axis is not shown completely.
    You can see this issue in sample jsfiddle given by you also.
    Please let me know if there is any work around to show this label also.

    Thanks,
    Swapnil

    #7027

    Anjali
    Participant

    Hi,

    You can try reducing the font size of label by using the property labelFontSize.


    Anjali

    #7029

    SwapnilV007
    Participant

    Hi Anjali,

    Reducing font size of label does not help. Still the labels are not shown completely.
    I tried it with your sample example also. But it does not work there too.

    Thanks,
    Swapnil

    #7031

    Anjali
    Participant

    Hi,

    After reducing the fontSize of label, if last value is not showing properly then you can use labelangle property.


    Anjali

    #7081

    SwapnilV007
    Participant

    Hi Anjali,

    Changing the angle does not suit my requirement. I am supposed to show the labels Horizontally without changing there orientation.
    Is there any other solution to solve this issue?

    Thanks,
    Swapnil

    #7088

    Anjali
    Participant

    Hi,

    As of now changing labelAngle is the only solution for this. We’ll look into this issue in future version.


    Anjali

    #7127

    SwapnilV007
    Participant

    Hi Anjali,

    Thanks for the reply. When can I expect the next version that will have this issue fixed.

    Thanks,
    Swapnil

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

You must be logged in to reply to this topic.