Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

Maker on ScatterGraph at mouse clic position

Hello,

 

i'm looking for a way to put a marker on a scatter/wave graph with a mouse clic.

 

Do you have any answers ?

 

Thanks.

F.

0 Kudos
Message 1 of 2
(1,815 Views)

I've found a solution :

 

 PointF point = scatterGraph1.PointToVirtual( new Point( e.X, e.Y ) );
           
            double x = xAxis1.Range.Minimum + ( ( xAxis1.Range.Maximum - xAxis1.Range.Minimum ) * point.X);
            double y = yAxis1.Range.Minimum + ( ( yAxis1.Range.Maximum - yAxis1.Range.Minimum ) * point.Y );

            Console.WriteLine( "X : " + x );
            Console.WriteLine( "Y : " + y );


            XYPointAnnotation cur = new XYPointAnnotation();
            scatterGraph1.Annotations.Add( cur );



            cur.XPosition = x;
            cur.YPosition = y;

 

It works for linear axis but not for logarithm ones...

 

Is there a solution ?

Thanks.

0 Kudos
Message 2 of 2
(1,780 Views)