XYHitTest Method Example

The following example retrieves the information for the pen at the coordinate x,y for the chart Chart Chart1. Note that the x and y parameters come fromMouseUp and/or MouseDown event prototypes.

Dim dDate As Date

Dim dValue As Double

Dim sPenName As String

Dim iPen As Object

Dim lPenNum As Long

Dim bReal As Boolean

Chart1.XYHitTest x, y, dDate, dValue, sPenName, iPen, lPenNum, bReal