@jameela,
CanvasJS just renders the dataPoints in the order passed by you, it doesn’t sort the dataPoints. However with few lines of code, you can sort dataPoints to render chart with linear order of x as shown in this JSFiddle.
—-
Manoj Mohan
Team CanvasJS