Bug in Axis.CalcPosPoint (log scales)
Posted: Tue Jul 06, 2010 9:35 am
Hi,
I must inform that the mentioned method calculates wrong values for logarithmic axes. My implementation is:
For instance, having the mouse over X = 0.005 the displayed value is "0.00014".
Regards,
Uli
I must inform that the mentioned method calculates wrong values for logarithmic axes. My implementation is:
Code: Select all
Private Sub Chart1_MouseMove(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Chart1.MouseMove
Dim X, Y, X2, Y2 As Double
Try
If CursorTool1 IsNot Nothing Then
X = CursorTool1.XValue
Else
X = Chart1.Axes.Bottom.CalcPosPoint(e.X)
End If
Y = Chart1.Axes.Left.CalcPosPoint(e.Y)
X2 = Chart1.Axes.Top.CalcPosPoint(e.X)
Y2 = Chart1.Axes.Right.CalcPosPoint(e.Y)
Dim XX = X.ToString("G5")
Dim YY = Y.ToString("G5")
Dim XX2 = X2.ToString("G5")
Dim YY2 = Y2.ToString("G5")
MyMainForm1.StatusStrip.Items(0).Text = " X = " + XX
MyMainForm1.StatusStrip.Items(1).Text = " Y = " + YY
MyMainForm1.StatusStrip.Items(2).Text = " X2 = " + XX2
MyMainForm1.StatusStrip.Items(3).Text = " Y2 = " + YY2
Catch
Dim i As Integer = 0
For i = 0 To 3
MyMainForm1.StatusStrip.Items(i).Text = " -"
Next
End Try
End Sub
Regards,
Uli