Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

wpf example Charting.2010 Why plot becomes slow after a few points

hello,

I use wpf example in National Instruments\MStudioVS2010\DotNET\Examples\WPF\Standard\Charting\cs

 

“Charting.2010”,and modifed,

 

I wonder Why plot becomes slow after a few points(400)!

 

Thanks!

0 Kudos
Message 1 of 3
(5,925 Views)

When the graph reaches 400 points in the example project, every additional point added to the chart collection causes the range of the graph to update, which causes WPF to perform a layout pass to re-draw the horizontal scale for the new range. Before reaching 400 points, updates to the chart collection merely resulted in pixels being written to the raster render surface.


The Using the Measurement Studio WPF Controls help topic links to a number of articles on optimizing performance in WPF, including Optimizing the WPF Graphs. For example, setting SuppressScaleLayout on the graph to true, or setting Adjuster on the horizontal axis to PagedChart instead of ContinuousChart, or setting Visibility on the horizontal axis to Collapsed, are all possibilities you can use to achieve improved performance over the default graph settings. The best approach depends on the particular needs of your application.

~ Paul H
0 Kudos
Message 2 of 3
(5,904 Views)

thank you for your help!Smiley Happy

0 Kudos
Message 3 of 3
(5,894 Views)