tags:

views:

210

answers:

3

Hello,

I am working on a graph in WPF, in each section there are thousands of points to draw. The performance for rendering this graph is horrible.

Does anyone have any experience with a filter that will represent the graph with much fewer points - similar to the way a stock graph draws itself when its zoomed out.

Thank you.

+1  A: 

http://dougfinke.com/blog/?p=369

Paul Betts
+2  A: 

When you talk about a graph, I'm assuming you mean as in a chart rather than lots of nodes and edges (hence the stock example).

So, assuming that's the case, here are a couple of webpages covering algorithms for simplifying polylines:

http://www.kevlindev.com/tutorials/geometry/simplify_polyline/page2.htm

http://softsurfer.com/Archive/algorithm_0205/algorithm_0205.htm

You could generate simplified polyline versions of the graph lines for various scales (on demand).

mackenir
A: 

What do you mean by dynamic graph generation ? kindly explain in detail .

andy
What you posted is an "answer". You should delete this and repost it as a comment (use the "add comment" button right under the question).
Jon B