Home › forums › Chart Support › ISO Work week and year rollover
Tagged: ISO WW
I am using CanvasJS to draw a chart with data grouped by work week. So there will be data similar to
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.
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.
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 axis values are interpreted to be numerical.
By changing the assignment to
it was no longer interpreted as numerical input and auto populating of the X axis for which there was no data no longer occurs.
Glad that you figured it out :)
You must be logged in to reply to this topic.