Hello!
I want to let the user be able to press the right mouse button, drag the mouse and then finally release the mouse button in a chart, to "select" an area within that chart. (Similar to how you select an area when you zoom, only that you use the left mouse button then.)
When the user releases the right mouse button I want to determine what points in the series lies within the "selected" area. Is this possible?
Best regards
Elisabeth
Selecting multiple points
Hi Elisabeth,
Yes, this can be done using the OnMouseDown and OnMouseUp events to determine the mouse position , i.e. :When the user releases the right mouse button I want to determine what points in the series lies within the "selected" area. Is this possible?
Code: Select all
Private Sub TChart1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles TChart1.MouseDown
ValX = e.X
End Sub
Private Sub TChart1_MouseUp(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles TChart1.MouseUp
ValX2 = e.X
Label1.Text = "from point : " + TChart1.Series(0).XScreenToValue(ValX).ToString + " to point : " + TChart1.Series(0).XScreenToValue(ValX2).ToString
End Sub
Pep Jorge
http://support.steema.com
http://support.steema.com