Checks whether a point with the particular coordinates is contained inside a chart element. Namespace: MindFusion.Charting
|
C#
![]() |
---|
public virtual ChartElement HitTest ( |
Visual Basic
![]() |
---|
Public Overridable Function HitTest ( _ |
JavaScript
![]() |
---|
function HitTest (x, y) |
The Y-coordinate of the point to check.
An object of type ChartElement that contains the point described by the two parameters of the function; null if no object is found.
Call this method inside event handlers for user interaction with the mouse. The mouse coordinates are retrieved from the event data.
The Chart control overrides HitTest to return a specific chart element. Cast the result to Bar, Line, Scatter, Bubble, PiePiece or RadarPiece according to the chart type you are using. All HitTest methods may return null so always check.