Home › forums › Report Bugs › Line graph not correct
This topic contains 3 replies, has 3 voices, and was last updated by Danny 4 months, 2 weeks ago.
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.
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.
You must be logged in to reply to this topic.
ASP.NET MVC Charts
ContactSales EnquiriesSupport ForumTwitter Support Handle