Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

cursor to display plot name

Solved!
Go to solution

I am using the scatterGraph object to display multiple plots.  I would like to be able to have the user move the cursor to a point on a plot and let them know which plot data they are looking at.  I thought I could get this by using the AfterMoveCursor event and the NationalInstruments.UI.AfterMoveXYCursorEventArgs e class and the e.Cursor.Plot to find out which plot I am using but I am stuck here and cannot find any way for getting the plot index value.

 

Any help is appreciated,

 

Thanks Peter

0 Kudos
Message 1 of 4
(3,702 Views)
Solution
Accepted by topic author price1

Hey Peter - 

 

Does the following help?

 

int index = WaveformGraph.Plots.IndexOf(e.Cursor.Plot as WaveformPlot);

 

NickB

National Instruments 

Message 2 of 4
(3,697 Views)

Nick,

 

Thanks this was very helpful.  I needed to change it a bit to  

int index = scatterGraph1.Plots.IndexOf(e.Cursor.Plot as NationalInstruments.UI.ScatterPlot);

but it works great.

 

Thanks again,

 

Peter

 

Smiley Happy

0 Kudos
Message 3 of 4
(3,694 Views)

Doh - I read right over the fact you were using the ScatterGraph.  Glad that does it for you!

 

NickB

National Instruments 

0 Kudos
Message 4 of 4
(3,690 Views)