MS Chart Control line interpolation failure?

Hi Experts!

I have an ASP 4.0 app with some chart controls showing data from a SQL server.
There are all XY graphs with charttype = line (or fastline). For some, to me, unknown reason the lines fail to connect some of the data points and overlap (see attached picture).

I suspect that there is something wrong with the internal interpolation routine in the Chart Control object, maybe I'm wrong?
Does anyone here know of a solution to get rid of this I would be more than happy?

Who is Participating?
AndyAinscowConnect With a Mentor Freelance programmer / ConsultantCommented:
Are the datapoints sorted correctly ?  (This looks like the jumps could be between datapoints in the order they are in the dataset)
peer754Author Commented:
All datapoints are inserted into the DB in real-time, i.e. they should be sorted w.r.t. time.
I will make sure however if that's the case.
AndyAinscowFreelance programmer / ConsultantCommented:
Just because they are sorted in the table doesn't mean they will be sorted in the dataset (they could be but...)
peer754Author Commented:
You were right, the data was not sorted (WHY?). The data is added at real-time in a time interval to a table with id so I assumed (wrongly) that the data should be sorted as it it's been added.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.