Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

How to translate client coordinate into plot coordinate?

Is there a way to translate client coordinate into plot coordinate?
 
I know that XYGraph has methods like GetCursorAt(). But,
 
1. ScatterGraph does not have any such function.
2. Even the functions like GetCursorAt() cannot fit our requirement.
 
The functionality I want to implement is to plot XYCursor (or other stuff) at the position where the mouse clicks. Since the graph is able to zoom and pan, so I need to know the current zoom scale and pan position.
 
How could I do this? I am thinking about to do "zoom" and "pan" by myself and then keep track of the zoom scale and pan position.
0 Kudos
Message 1 of 4
(3,657 Views)
Take a look at this post. It will do what you want.

Brock
0 Kudos
Message 2 of 4
(3,646 Views)

If you have 8.0.1 of Measurement Studio, we added InverseMapDataPoint and InverseMapDataPoints functions to XYPlot. This does what you want also.

Brock

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

Thanks, Brock!

So "xAxis.Range.Maximum" and "xAxis.Range.Minimum" means the range of current view, right?

This is very helpful. Thanks.

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