Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

Synchronized zoom between graphs

Nick -

 

I gave this technique a try in my app. While the technique does get the job done, for my needs, the performance is woefully inadequate. In my app there could be dozens of graphs that need to be kept in synch on both zoom and pan operations.

 

Glad to hear you have suggested product enhancements for requirement. Keep up the good work.

 

If I can help by providing a test harness for my situation, let me know.

 

 Joe

0 Kudos
Message 11 of 13
(1,910 Views)

Hey Joe,

 

If you haven't tried this yet, one thing that may significantly improve the performance of the zoom operations is to set the ZoomAnimation property of the graph to false.  Because the zooms must take place serially, there may still be some noticible delay between the first and last update - especially if you have dozens of graphs - but the performance should be much better.  

 

Also for all interested, I missed an overload on ZoomXY that makes the programmatic zooming operation much cleaner.  Inside your event handler, this is the only method you would need to call:

 

scatterGraph2.ZoomXY(scatterPlot2, e.XAxis.Range.Minimum, scatterPlot2.YAxis.Range.Minimum,
                e.XAxis.Range.Maximum - e.XAxis.Range.Minimum,
                scatterPlot2.YAxis.Range.Maximum - scatterPlot2.YAxis.Range.Minimum);

Where:

Parameters:

referencePlot
An XYPlot to use as the
context for xData, yData, width, and height.
xData
The x data value of the corner of the plot area region to zoom.
yData
The y data value of the corner of the plot area region to zoom.
width
The width in data units of the plot area region to zoom.
height
The height in data units of the plot area region to zoom.

 

NickB

National Instruments 

Message 12 of 13
(1,905 Views)

Nick -

 

Works perfectly and performance is great.

 

Thanks.

 

Joe

0 Kudos
Message 13 of 13
(1,853 Views)