windowsforms-devexpress-dot-xtracharts-dot-chartcontrol-d4cff730.md
Specifies whether or not hit-testing is enabled for a Chart control.
Namespace : DevExpress.XtraCharts
Assembly : DevExpress.XtraCharts.v25.2.UI.dll
NuGet Package : DevExpress.Win.Charts
public bool RuntimeHitTesting { get; set; }
Public Property RuntimeHitTesting As Boolean
| Type | Description |
|---|---|
| Boolean |
true if a chart provides hit information at runtime; otherwise, false.
|
The default RuntimeHitTesting property value is false , which means that hit-testing is disabled at runtime. This is done to accelerate chart rendering.
Set the RuntimeHitTesting option to true if you want to use the ChartControl.CalcHitInfo method to get information on clicks within the chart.
Refer to Hit Information for more information.
Note
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.
private void Form_Load(object sender, EventArgs e) {
chartControl.RuntimeHitTesting = true;
//...
}
Private Sub Form_Load(ByVal sender As Object, ByVal e As EventArgs)
chartControl.RuntimeHitTesting = true
'...
End Sub
The following code snippets (auto-collected from DevExpress Examples) contain references 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.
winforms-dashboard-custom-items/CS/TutorialsCustomItems/CustomItems/FunnelItemControlProvider.cs#L20
chart = new ChartControl();
chart.RuntimeHitTesting = true;
chart.BorderOptions.Visibility = DevExpress.Utils.DefaultBoolean.False;
chart = new ChartControl();
chart.RuntimeHitTesting = true;
chart.BorderOptions.Visibility = DevExpress.Utils.DefaultBoolean.False;
winforms-dashboard-custom-items/VB/TutorialsCustomItems/CustomItems/FunnelItemControlProvider.vb#L26
chart = New ChartControl()
chart.RuntimeHitTesting = True
chart.BorderOptions.Visibility = DevExpress.Utils.DefaultBoolean.False
chart = New ChartControl()
chart.RuntimeHitTesting = True
chart.BorderOptions.Visibility = DevExpress.Utils.DefaultBoolean.False
See Also
How to: Determine a Chart Element the Mouse Pointer Hovers Over
How to: Determine which Series Point Is Under the Test Point