V
Vergassivellaunus
Guest
I have a chart with a line graph.
If I write:
Private Sub Chart1_MouseDown(sender As Object, e As MouseEventArgs) Handles Chart1.MouseDown
x = Me.Chart1.ChartAreas(0).CursorX.Position
y = Me.Chart1.ChartAreas(0).CursorY.Position
end sub
when i do mouse down i read x but y=NaN. Why this ?
If I write:
Private Sub Chart1_MouseDown(sender As Object, e As MouseEventArgs) Handles Chart1.MouseDown
Me.Chart1.ChartAreas(0).CursorX.SetCursorPixelPosition(New PointF(e.X, e.Y), False)
Me.Chart1.ChartAreas(0).CursorY.SetCursorPixelPosition(New PointF(e.X, e.Y), False)
x = Me.Chart1.ChartAreas(0).CursorX.Position
y = Me.Chart1.ChartAreas(0).CursorY.Position
end sub
whith mouse down i read x and y, but only integers. I need to read them as real numbers.
Continue reading...
If I write:
Private Sub Chart1_MouseDown(sender As Object, e As MouseEventArgs) Handles Chart1.MouseDown
x = Me.Chart1.ChartAreas(0).CursorX.Position
y = Me.Chart1.ChartAreas(0).CursorY.Position
end sub
when i do mouse down i read x but y=NaN. Why this ?
If I write:
Private Sub Chart1_MouseDown(sender As Object, e As MouseEventArgs) Handles Chart1.MouseDown
Me.Chart1.ChartAreas(0).CursorX.SetCursorPixelPosition(New PointF(e.X, e.Y), False)
Me.Chart1.ChartAreas(0).CursorY.SetCursorPixelPosition(New PointF(e.X, e.Y), False)
x = Me.Chart1.ChartAreas(0).CursorX.Position
y = Me.Chart1.ChartAreas(0).CursorY.Position
end sub
whith mouse down i read x and y, but only integers. I need to read them as real numbers.
Continue reading...