Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

wpf graph - remove plot

Sorry, in trying to keep the example brief it looks like I copied the update incorrectly, mixing old and new code. Here is the full "#if WORKAROUND2" code block for the RemovePlotData program (the updated file is also attached):


    var data = graph.Data.Where( (d, i) => !PlotHistory.Any( p => p.Index == i ) ).ToArray( );
    var plots = graph.Plots.Except( PlotHistory ).ToArray( );

    graph.Data.Clear( );
    graph.Plots.Clear( );

    graph.Plots.AddRange( plots );
    graph.Data.AddRange( Enumerable.Repeat( new int[0], data.Length ) );
    graph.Data.ReplaceAll( data );


The desired plots are added before the data and the workaround data is the same length as the final data, so no extra plots should be created. After the workaround data is added, we replace it with the final data, which is what gets displayed on screen.

~ Paul H
0 Kudos
Message 11 of 12
(2,568 Views)

Just wanted to let you know this issue (#381465) was fixed in the Measurement Studio 2013 release.

~ Paul H
0 Kudos
Message 12 of 12
(2,536 Views)