Skip to main content

TdxChartHitCode Enum

Enumerates HitTest codes available in the Chart control.

Declaration

TdxChartHitCode = (
    None,
    Chart,
    ChartTitle,
    DiagramTitle,
    LegendTitle,
    SeriesTitle,
    AxisTitle,
    TotalLabel,
    Legend,
    LegendItem,
    Axis,
    AxisValueLabel,
    SeriesValueLabel,
    SeriesPoint,
    Diagram,
    PlotArea,
    Series
);

Members

Name Description Example
None

The inspected point is outside the Chart control client area.

This value has the same effect on all HitTest-related properties similarly to the Chart enumeration value – they return nil (in Delphi) or nullptr (in C++Builder) in this case.

VCL Chart Control: No Inspected Chart Element

Chart

The inspected point is within the Chart control’s client area but does not belong to any particular visual element.

This value has the same effect on all HitTest-related properties as does the None enumeration value – they return nil (in Delphi) or nullptr (in C++Builder) in this case.

VCL Chart Control: An Inspected Chart Client Area

ChartTitle

The inspected point belongs to a chart title.

You can use the Title property to access the inspected chart title. Cast the property value to the TdxChartTitle class to access all public API members of the inspected chart title.

VCL Chart Control: An Inspected Chart Title

DiagramTitle

The inspected point belongs to a diagram title.

You can use Title and Diagram properties to access the inspected title and its parent diagram, respectively. Cast the Title property value to the TdxChartDiagramTitle class to access all public API members of the inspected chart title.

VCL Chart Control: An Inspected Diagram Title

LegendTitle

The inspected point belongs to a legend title.

You can use Title and Legend properties to access the inspected title and its parent legend pane, respectively. Cast the Title property to the TdxChartLegendTitle class to access all public API members of the inspected legend pane title.

  • If the parent legend pane of the inspected title belongs to the Chart control, you can cast the Legend property value to the TdxChartLegend class to access all public API members of the parent legend pane.
  • If the parent legend pane of the inspected title belongs to a diagram, you can cast the Legend property value to the TdxChartDiagramLegend class to access all public API members of the parent legend pane. In addition, you can use the Diagram property to access the parent diagram of the inspected title’s parent legend pane.

VCL Chart Control: An Inspected Legend Title

SeriesTitle

The inspected point belongs to a Pie or Doughnut series title.

You can use Title, Series, and Diagram properties to access the inspected title and its parent series and diagram, respectively. Cast the Title property value to the TdxChartSeriesTitle class to access all public API members of the inspected series title.

VCL Chart Control: An Inspected Series Title

AxisTitle

The inspected point belongs to an axis title.

You can use Title and Axis properties to access the inspected title and its parent axis, respectively. Cast the Title property value to the TdxChartAxisTitle class to access all public API members of the inspected axis title.

VCL Chart Control: An Inspected Axis Title

TotalLabel

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

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

VCL Chart Control: An Inspected Total Label

Legend

The inspected point is within a chart or diagram legend pane.

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

  • If the inspected legend pane belongs to the Chart control, you can cast the Legend property value to the TdxChartLegend class to access all public API members of the inspected legend pane.
  • If the inspected legend pane belongs to a diagram, you can cast the Legend property value to the TdxChartDiagramLegend class to access all public API members of the inspected legend pane.

VCL Chart Control: An Inspected Legend Pane

LegendItem

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

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

  • If the parent legend pane of the inspected legend item belongs to the Chart control, you can cast the Legend property value to the TdxChartLegend class to access all public API members of the parent legend pane.
  • If the parent legend pane of the inspected legend item belongs to a diagram, you can cast the Legend property value to the TdxChartDiagramLegend class to access all public API members of the parent legend pane.

VCL Chart Control: An Inspected Legend Item

Axis

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

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

VCL Chart Control: An Inspected Axis

AxisValueLabel

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

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

VCL Chart Control: An Inspected Axis Value Label

SeriesValueLabel

The inspected point is within a series value label.

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

VCL Chart Control: An Inspected Series Value Label

SeriesPoint

The inspected point belongs to a series point in a diagram.

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

VCL Chart Control: An Inspected Series Point

Diagram

The inspected point is within one of the visible diagrams, but does not belong to any of the diagram elements, such as axes, series, labels, etc.

You can use only the Diagram property to access an inspected diagram. Cast the property value to the TdxChartSimpleDiagram or TdxChartXYDiagram class depending on the actual diagram type to access all diagram-specific public API members.

VCL Chart Control: An Inspected Diagram Area

PlotArea

The inspected point is within an XY diagram plot area, but does not belong to any of the diagram elements within it, such as series, series points, value labels, etc.

If the Chart control’s HitTest.HitCode property returns this code, the HitTest.InPlotArea property returns True. You can use HitTest.Argument and HitTest.Value properties to obtain the coordinates of the inspected point within the plot area of an XY diagram in corresponding axis measurement units.

You can use only the Diagram property to access the inspected diagram. Cast this property value to the TdxChartXYDiagram class to access all public API members of the inspected XY diagram.

VCL Chart Control: An Inspected Diagram Plot Area

Series

The inspected point belongs to a series in a diagram.

You can use Series and Diagram properties to access the inspected series and its parent diagram, respectively. Cast the Series property value to the TdxChartSimpleSeries or TdxChartXYSeries class depending on the actual series type to access all series-specific public API members.

VCL Chart Control: An Inspected Series

Remarks

HitTest codes allow you to identify different visual Chart elements.

Note

TdxChartHitCode is a scoped enumeration type. Use the type name together with a scope resolution token (. in Delphi or :: in C++Builder) followed by an enumeration value to refer to this value. For example, use TdxChartHitCode.SeriesValueLabel (in Delphi) or TdxChartHitCode::SeriesValueLabel (in C++Builder) to refer to the SeriesValueLabel value in code.

Direct TdxChartHitCode Type Reference

The TdxChartHitTest.HitCode property references the TdxChartHitCode type.

See Also