Home Forums Chart Support Issue with Months Name on Axis in Chart

Issue with Months Name on Axis in Chart

Viewing 6 posts - 1 through 6 (of 6 total)
  • #28551

    Hi All,

    I am facing an issue. When I attempt to make a chart, I am not able to make the bar on month label. i.e March month bar does come above the march month marker on x axis. Same with February, April & so on.

    Kindly help me with the solution.

    Thanks in advance.
    Issues in Chart

    #28573

    @priyanka-kumari,

    The labels are shown at every interval based on interval and intervalType. As you are setting the interval to 1 and intervalType to month, label is shown at ‘March 1, 2020’. And the x-value of the dataPoint / column that’s been shown is ‘March 2, 2020’. Alongside as you are hiding the date in axis label and just showing month, it may seem like not aligned. Showing date and month by setting valueFormatString to “DD MMMM” makes it clear that the position of labels is proper. Please take a look at this updated JSFiddle.

    —-
    Manoj Mohan
    Team CanvasJS

    #61024

    Manoj,

    I have a rangeBar chart where I am showing months in on the y-axis using the labelFormatter to do it. But when the chart renders its showing every other month on the y-axis and not every month. I know intervalType for dates does not work on the y-axis, but is there a work around using date math to get this to show every month?

    Thanks,
    Shannon

    #61029

    Shannon,

    Can you kindly create a JSFiddle reproducing the issue you are facing along with sample data (dummy data) & share it with us so that we can look into the code / chart-options being used, understand the scenario better and help you out?

    —-
    Manoj Mohan
    Team CanvasJS

    #61030

    Hello Manoj,

    I actually figured out the math to get this to work on the interval. interval: (365*24*60*60*1000)/12, I know this doesn’t count for leap year but it will do for now.

    Thank you,
    Shannon

    #61051

    Shannon,

    Glad that you figured it out.

    —-
    Manoj Mohan
    Team CanvasJS

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

You must be logged in to reply to this topic.