ChartControl.CalcHitInfo(Point, Boolean) Method
Returns information on the chart elements located at the specified point.
Namespace: DevExpress.XtraCharts
Assembly: DevExpress.XtraCharts.v18.2.UI.dll
Declaration
Parameters
Name | Type | Description |
---|---|---|
point | Point | The hit point, relative to the chart’s top-left edge integer screen coordinates. |
Optional Parameters
Name | Type | Default | Description |
---|---|---|---|
forceUpdate | Boolean | True | The value that specifies that all update commands that the Chart currently collects should be executed immediately instead of before the control ‘s next rendering. |
Returns
Type | Description |
---|---|
ChartHitInfo | The information about the item in the test point. |
Remarks
Use the CalcHitInfo method to determine which element is located at the point with the specified coordinates. For example, you can use this method in the chart’s Click event handler to determine clicked element. In this case, pass the current mouse pointer’s coordinates as the method’s parameter.
Important
Make sure that the ChartControl.RuntimeHitTesting property is set to true to enable hit testing at runtime.
The Chart Control supports only 2D Chart Types hit testing and does not support hit testing for 3D Chart Types.