ChartControl.RuntimeHitTesting Property
Specifies whether or not hit-testing is enabled for a Chart control.
Namespace: DevExpress.XtraCharts
Assembly: DevExpress.XtraCharts.v18.2.UI.dll
Declaration
Property Value
Type | Description |
---|---|
Boolean | true, if a chart provides hit information at runtime; otherwise, false. |
Remarks
By default, the RuntimeHitTesting property is set to false, which means that hit-testing is disabled at runtime. This is done to accelerate chart rendering.
If you want to get information on clicks within the chart using the ChartControl.CalcHitInfo method, set the RuntimeHitTesting option to true.
Note
- If you handle the ChartControl.ObjectHotTracked event, it will be raised and information on hit-testing will be collected regardless of the current RuntimeHitTesting property value.
- When the RuntimeHitTesting property is enabled, the SeriesPoint object can be inaccessible when hovering over the LineSeriesView at runtime. To resolve this issue, make sure the line point markers are visible (set the LineSeriesView.MarkerVisibility property to true).
- If you need to enable the RuntimeHitTesting property at runtime, turn it on during a chart’s initialization. You can do this in the Form’s constructor after the components’ initialization or in the Form’s Load event handler.
Related GitHub Examples
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the RuntimeHitTesting property.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.