Home Forums Report Bugs Line graph not correct

Line graph not correct

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


    I tried to do a line graph with CanvasJS but it doesn’t draw the line in the correct order.


    It draws the line to May 2016 first than goes back and brings it to January 2015 instead of first connecting to January 2015 then going to the 2016 one.

    Please help



    Also how is it possible to specify the ordering. I have an x axis with just labels that I would like to appear in a specific order. Ex. Fall 2015, Winter 2016, Spring 2016, Fall 2016, etc.

    I searched but i could not find a method… It puts the values out of order. The only method I could think of is to plot it via the date and override the labels afterwards.


    In whichever order you provide dataPoints it will render in the same order.

    We don’t sort dataPoints before plotting. If required you have to sort dataPoints before rendering. Here is an example.


    Just as @Sanjoy has said, I have changed around with the order of points to render and this hopefully solved your issue.


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

You must be logged in to reply to this topic.