Home Forums Chart Support Align multiple x-axis

Align multiple x-axis

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

    Hi,
    I’m trying to align months on multiple x-axis…

    So on first x-axis I have: 1st Jan 2021, 1st Feb 2021, 1st Mar 2021
    and on second x-axis I have 1st Apr 2021, 1st May 2021, 1st Jun 2021

    I want the 1st Jan 2021 to be exactly in line with the 1st Apr 2021 etc..

    I have a jsfiddle here which clearly shows my issue: https://jsfiddle.net/mtgrn75y/9/

    Any help would be appreciated.

    Thanks

    #36427

    @elcollie.

    As the number of days varies between months, axis labels cannot be aligned across multiple axes in the case of date-time values. However, in your example, you can use the label property instead of x value to align the labels on both axes.

    Kindly take a look at this updated JSFiddle for a working example.

    Align labels on multiple axis


    Thangaraj Raman
    Team CanvasJS

    #36435

    Thanks Thangaraj nice solution.

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

You must be logged in to reply to this topic.