Skip to main content

TdxChartHitTest.HitCode Property

Identifies the Chart control’s visual element to which the inspected point belongs.

Declaration

property HitCode: TdxChartHitCode read;

Property Value

Type Description
TdxChartHitCode

The type code of the inspected visual element of the Chart control.

Refer to the following section for detailed information: Hit Codes and HitTest Information.

Remarks

Use the HitCode property to identify the type of the Chart control’s visual element at the inspected point. If this property returns TdxChartHitCode.None, the inspected point is outside the Chart control’s client area.

Hit Codes and HitTest Information

Different HitCode property values correspond to different Chart visual elements and their HitTest information:

Axis

The inspected point belongs to an axis in an XY diagram.

VCL Chart Control: An Inspected Axis

You can use Axis and Diagram properties to access the inspected axis and its parent diagram, respectively.

AxisValueLabel

The inspected point belongs to an axis value label in an XY diagram.

VCL Chart Control: An Inspected Axis Value Label

You can use AxisValueLabel, Axis, and Diagram properties to access the inspected value label and its parent axis and diagram, respectively.

Diagram

The inspected point belongs to a diagram area in the Chart control. When the HitCode property returns the Diagram property value, the inspected point is not within a specific diagram visual element, such as an axis, series point, or value label.

VCL Chart Control: An Inspected Diagram

You can use only the Diagram property to access the inspected diagram.

Legend

The inspected point belongs to a chart or diagram legend pane.

VCL Chart Control: An Inspected Legend Pane

You can use only the Legend property to access the inspected legend pane.

LegendItem

The inspected point belongs to a legend item.

VCL Chart Control: An Inspected Legend Item

You can use LegendItem and Legend properties to access the inspected legend item and its parent legend pane.

PlotArea

The inspected point belongs to the plot area of an XY diagram.

VCL Chart Control: An Inspected Plot Area

The InPlotArea property returns True. You can use Argument and Value properties to obtain the coordinates of the inspected point in corresponding axis measurement units.

Series

The inspected point belongs to a series.

VCL Chart Control: An Inspected Series

You can use Series and Diagram properties to access the inspected series and its parent diagram, respectively.

SeriesPoint

The inspected point belongs to a series point.

VCL Chart Control: An Inspected Series Point

You can use SeriesPoint, Series, and Diagram properties to access the inspected series point and its parent series and diagram, respectively.

SeriesValueLabel

The inspected point belongs to a series value label.

VCL Chart Control: An Inspected Series Value Label

You can use SeriesValueLabel, SeriesPoint, Series, and Diagram properties to access the inspected series point and its parent point, series, and diagram, respectively.

AxisTitle | ChartTitle | DiagramTitle | LegendTitle | SeriesTitle

The inspected point belongs to an axis, chart, diagram, legend, or series title.

VCL Chart Control: An Inspected Title

You can use the Title property to access the inspected title. Cast the Title property value to the corresponding title class to access all title type-specific public API members.

TotalLabel

The inspected point belongs to a total label of a Doughnut or Pie series in a simple diagram.

VCL Chart Control: An Inspected Total Label

You can use TotalLabel, Series, and Diagram properties to access the inspected total label and its parent series and diagram, respectively.

Refer to the TdxChartHitCode type description for detailed information on all available hit codes.

See Also