Question

I'd like to draw a high-framerate (30fps+) graph/chart in a Windows Forms app.

How?

Windows Forms gets TERRIBLE frame rates drawing a clear-background drawing over a window.

(I come from the land of GNU, so I apologize if this is obvious.)

Was it helpful?

Solution

If you're using Windows Forms (as said in your question):

If you need to get >30FPS, you'll probably need to change to a different technology. GDI+ drawing is not too efficient.

DirectX would work well for this. You can do the charting in Direct3D using DirectX embedded in a Window. SlimDX is a good way to do this from C#.

That being said, you tagged this with WPF - if you're using WPF, everything is retained mode graphics, so there should be no "clear-background drawing" required. You would just put in the chart elements as needed. In that case, 30FPS should be doable.

OTHER TIPS

Running full tilt I get about 180FPS using a System::Windows::Forms::DataVisualization::Charting::Chart plotting 128bins of an FFT using a 'FastLine' style for the series of data. That's running on an Intel Core 2 Duo (2.53Ghz) IBM Thinkpad.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top