03-02-2006 12:45 PM
03-03-2006 09:08 AM
03-04-2006 03:12 PM
03-08-2006 02:51 AM
03-08-2006 08:34 AM - edited 03-08-2006 08:34 AM
Message Edited by Tyler T. on 03-08-2006 08:35 AM
09-17-2008 03:52 PM
I implemented the suggested event handler code from the example zip.
My application could have an array of graphs that I need to keep in synch with the graph that is panning/zooming. Zooming works like a champ but panning is a bit quirky. The other items in the array of graphs seem to paint the new range before the item that is actually panning. I toyed with SuspendLayout/ResumeLayout and the drawing improved somewhat but not completely.
It seems line the *RangeChanged event is bubbled up too soon.
I am using v8.0.20.334
Cheers.
Joe
02-23-2009 04:03 AM
I think I can make the zooms synchronize, but I fail to see how unzoom could work.
Any hints on unzoom?
I too would like to hear any hints on how to sync two graphs via the range changes while keeping unzoom useable.
02-23-2009 09:39 AM
Hello furmar,
You can use the same logic as in the example program, but you will want to add an event handler for the ZoomPanUndone event. Within this event handler you can set the ranges of the two graphs to be equal, as in the other event handlers.
NickB
National Instruments
03-10-2009 04:52 AM
This is a code snippet from the 'ZoomFactor' example from a few posts up.
private void waveformGraph1_XAxisRangeChanged(object sender, NationalInstruments.UI.XAxisEventArgs e)
{
if (switch1.Value == false){
waveformGraph2.XAxes[0].Range = waveformGraph1.XAxes[0].Range;}
}
I would like to know if there's a way of matching the waveformGraph2's x-axis range to the waveformGraph1's x-axis range in such a way that it adds an entry to waveformGraph2's undo buffer.
03-10-2009 11:31 AM
Hello furmar,
As I looked into this for you, I have found that the implementation and resulting behavior necessary to achieve what you want could use some improvement. It is certainly possible, but it's also not quite as easy as it should be. I have filed a couple feature improvement requests as a result of my investigation, and hopefully this operation will become a little more intuitive in the future. Please see the code below for how to mirror the zoom to a second graph such that the zoom adds an entry to the second graph's undo buffer:
Another important thing to note is that to interactively (shift + right-click) undo the zoom - the graph of interest must have focus in order to be able to interactively undo.
Please let me know if anything remains unclear, or if I can help with anything else
NickB
National Instruments