07-06-2020 02:54 AM
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.
07-07-2020 08:32 AM
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.