Handing large datasets in charts quickely

Posted by Sharmila under C# on 7/13/2010 | Views : 1991 | Status : [Member] | Replies : 1
I have a large dataset(around 50000 points) which has be visualized in a line chart.The size of Canvas may vary according to the size of dataset. Massive amount of points makes the drawing too slow.It also results in cluttering and overlapping of points due to plotting of several points close to each other.So visual representation of data will be unsatisfactory.

I have a collection of points (say around 50,000) which has to be drawn in a line chart.I am using line segment and Path to draw this points in chart.
List<double> src = ... //50000 points.
LineSegment segment = new LineSegment();
//get the point x and y value present in the collection
//get the previous point
//add line to path
Since I am using large data set it consumes lot of time to load.So I need to eliminate some unwanted points like duplicates..and also for example if i have points like (1,2)(2,4)(3,6) then (2,4) can be removed.The points which are located very closely to each other also can be removed.I have tried calculating average of consecutive points so that length will reduce to half.But it would not be feasible since it will not show proper values.Can you please provide me how can in achieve filtering of point list?How can I do sampling of data?


Posted by: Vuyiswamb on: 10/21/2010 [Member] [MVP] [Administrator] NotApplicable | Points: 25

When you say dataset , i assume you mean database , so you are worried that duplicates in your data make things slow ? what don't you remove the duplicates from your data before you load it to your control. i am i understanding your problem , please tell me if i am not,

Thank you for posting at Dotnetfunda

Sharmila, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response