Home Forums Chart Support ISO Work week and year rollover

ISO Work week and year rollover

Viewing 4 posts - 1 through 4 (of 4 total)
  • #23945

    I am using CanvasJS to draw a chart with data grouped by work week. So there will be data similar to
    1849 95.25
    1850 88.7
    1851 92.1
    1852 97.86
    1901 89.33
    1902 91.65

    The four digit number is the last two digits of the year followed by the two digit week number (IY, and IW in SQL “TO_CHAR”).

    The trouble I am getting is that the chart seems to want to auto-populate numbers from 53-99 along the X axis. Is there an easy way to force it to only use the specific values I am feeding it? The variables I am feeding in do not have data like 1865.

    #23952

    @v3rlon,

    Labels are not shown for all dataPoints but at every interval. Interval is auto-calculated based on axis range, width of the chart etc., which you can change by setting interval in Axis X. If this doesn’t solve your issue, please create a jsfiddle reproducing the issue so that we can look into it and help you out.

    __
    Shashi Ranjan
    Team CanvasJS

    #23962

    I found a fix.

    When the x axis values were in a format that could be interpreted as numerical, such as 1850 or even just 50, and the assignment was
    X: 91.25,
    X axis values are interpreted to be numerical.

    By changing the assignment to
    label: 91.25,
    it was no longer interpreted as numerical input and auto populating of the X axis for which there was no data no longer occurs.

    #23986

    @v3rlon,

    Glad that you figured it out :)

    ____
    Shashi Ranjan
    Team CanvasJS

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

You must be logged in to reply to this topic.