Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I move a collection of cursors as a single group?

I'm an excited beginner and I'm having much fun with graphs!
 
However, I'm a little stuck with a feature I'm after.....
 
I would like to display a collection of vertical cursors that can then be moved as a single group by grabbing the left most cursor. I would also like the XAxis range to track the vertical cursors, so the moving cursors remain in the same X location and whilst sliding over the actual plot.
 
Similary, I would like to be able to pan the plot whilst keeping the cursors fixed on screen, with a fixed XAxis range.
 
I will appreciate direction,
 
Michael
 
 
 
 
0 Kudos
Message 1 of 3
(3,377 Views)
As far as moving the cursors as a group, the only way I've been able to figure out is to create an OnAfterMoveCursor for the primary cursor.  In the OnAfterMoveCursor move each cursor the amount that the primary cursor moved.
 
OnAfterMoveCursor would be like the following:
.
.
.
double delta = _Graph.Cursors[0].XPosition - _ActiveCursorPosX ;
for( int i=1; i< _Graph.Cursors.Count; i++)
{
    _Graph.Cursors[i].XPosition  += delta;
}
 
// Set the primary cursor current x pos.
_ActiveCursorPosX = _Graph.Cursors[0].XPosition;
 
}// end OnAfterMoveCursor

 

Hope this helps,

Scott

0 Kudos
Message 2 of 3
(3,356 Views)

Scott,

Thanks for your reply !

I've tried several methods of doing this, and have settled on using the pan interaction mode to slide the cursors about, combined with replotting the graph at a different start point. This works a treat and without any jitter in the display!

With appreciation,

MIchael

0 Kudos
Message 3 of 3
(3,335 Views)