Home Forums StockChart Support X-axis defined date

X-axis defined date

Viewing 2 posts - 1 through 2 (of 2 total)
  • #44026

    Hi, how can we change the x-axis date to the latest month?

    for example now if the content is up to 2023-11-08
    The last point on x-axis is show Nov 2023
    Can we show the last x-axis label as Dec 2023

    https://jsfiddle.net/canvasjs/02zu4fd6/

    #44038

    @ezsolve,

    Axis labels are shown at every interval which is auto-calculated based on parameters like axis minimum, axis maximum, etc. In your case, the auto calculated interval is 2 months and hence ‘Dec 2019’ is not shown. You can set the interval to 1 month to show the label in Dec 2019 by using interval and intervalType properties as shown in the code-snippet below.

    axisX: {
          interval: 1,
          intervalType: "month"
    }

    Please take a look at this JSFiddle for a working example in which the label at Dec 2019 is shown in the navigator.

    __
    Sachin Bisht
    Team CanvasJS

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

You must be logged in to reply to this topic.