ChartControl.RuntimeHitTesting Property

Specifies whether or not hit-testing is enabled for a Chart control.

Namespace: DevExpress.XtraCharts

Assembly: DevExpress.XtraCharts.v20.1.UI.dll

Declaration

public bool RuntimeHitTesting { get; set; }
Public Property RuntimeHitTesting As Boolean

Property Value

Type Description
Boolean

true, if a chart provides hit information at runtime; otherwise, false.

Remarks

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
  • 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).

Example

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;
    //...
}
See Also