DataPointHitRegion Struct
Definition
Represents a hit test region for a data point on a chart. Used for detecting clicks on specific data points.
public struct DataPointHitRegion
Constructors
| Name | Description |
|---|---|
| DataPointHitRegion | Creates a new instance of DataPointHitRegion. |
DataPointHitRegion Constructor
Creates a new instance of DataPointHitRegion.
public DataPointHitRegion(Avalonia.Rect bounds, object source, int index, object category, double value, object dataItem, Avalonia.Media.Geometry hitGeometry)
Parameters
bounds Avalonia.Rect
source object
index int
category object
value double
dataItem object
hitGeometry Avalonia.Media.Geometry
Methods
| Name | Description |
|---|---|
| Contains | Determines whether the provided point is inside the hit region. |
Contains Method
Determines whether the provided point is inside the hit region.
public bool Contains(Avalonia.Point point)
Parameters
point Avalonia.Point
Returns
bool
Properties
| Name | Description |
|---|---|
| Bounds | Gets the bounding rectangle for hit testing. |
| Category | Gets the category of the data point (if applicable). |
| DataItem | Gets the original data item from the source. |
| DataPointIndex | Gets the index of the data point. |
| HitGeometry | Gets the optional geometry for precise hit testing. |
| Selectable | Gets the series or selectable component that owns the data point. |
| Source | Gets the source object (Series or Indicator) that owns this region. |
| Value | Gets the value of the data point. |
Bounds Property
Gets the bounding rectangle for hit testing.
public Avalonia.Rect Bounds { get; set; }
Category Property
Gets the category of the data point (if applicable).
public object Category { get; set; }
DataItem Property
Gets the original data item from the source.
public object DataItem { get; set; }
DataPointIndex Property
Gets the index of the data point.
public int DataPointIndex { get; set; }
HitGeometry Property
Gets the optional geometry for precise hit testing.
public Avalonia.Media.Geometry HitGeometry { get; set; }
Selectable Property
Gets the series or selectable component that owns the data point.
public Avalonia.Controls.Charts.IIndexSelectableChart Selectable { get; set; }
Source Property
Gets the source object (Series or Indicator) that owns this region.
public object Source { get; set; }
Value Property
Gets the value of the data point.
public double Value { get; set; }