Class DataLabelTappedEventArgs
Provides data for the DataLabelTapped event.
Inherited Members
Namespace: Syncfusion.Maui.Charts
Assembly: Syncfusion.Maui.Charts.dll
Syntax
public class DataLabelTappedEventArgs : EventArgs
Constructors
DataLabelTappedEventArgs(ChartSeries, int, object?, PointF?, ChartSegment?)
Initializes a new instance of the DataLabelTappedEventArgs class.
Declaration
public DataLabelTappedEventArgs(ChartSeries series, int dataIndex, object? dataItem, PointF? position, ChartSegment? segment = null)
Parameters
| Type | Name | Description |
|---|---|---|
| ChartSeries | series | The series containing the tapped data label. |
| int | dataIndex | Index of the data point in the series. |
| object | dataItem | Original data object from ItemsSource. |
| PointF | position | Screen coordinates (X, Y) of the label. |
| ChartSegment | segment | The segment/bar/point associated with label. |
Properties
DataIndex
Gets the zero-based index of the data point in the series.
Declaration
public int DataIndex { get; }
Property Value
| Type |
|---|
| int |
DataItem
Gets the original data object from ItemsSource.
Declaration
public object? DataItem { get; }
Property Value
| Type |
|---|
| object |
Position
Gets the screen coordinates (X, Y) of the label.
Declaration
public PointF? Position { get; }
Property Value
| Type | Description |
|---|---|
| PointF | A Microsoft.Maui.Graphics.PointF representing the screen coordinates of the tap. |
Remarks
These coordinates are relative to the chart area and represent where the user tapped on the screen. This value is in device-independent units (DIPs).
Segment
Gets the segment/bar/point associated with the label.
Declaration
public ChartSegment? Segment { get; }
Property Value
| Type |
|---|
| ChartSegment |
Series
Gets the series containing the tapped data label.
Declaration
public ChartSeries Series { get; }
Property Value
| Type |
|---|
| ChartSeries |