Home › forums › Using CanvasJS › Year and month combination on X-Axis
I would like to add year and month combination on X-Axis of the chart. I tried to combine both year and month on x-axis but the sorting of date issue is coming up. For example there are dates 1987-01, 1987-02, 1987-11, while displaying the graph the order of display is like 1987-1, 1987-11, 1987-2. What is the solution for this issue?
You can use valueFormatString to format the labels being displayed over axis.
If you are still facing the issue, kindly create JSFiddle reproducing the issue and share it with us so that we can look into the code, understand the scenario better and help you resolve.
You must be logged in to reply to this topic.