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?