Class DataLabelTappedEventArgs
Provides data for the DataLabelTapped event.
Inheritance
Namespace: Syncfusion.Maui.Charts
Assembly: Syncfusion.Maui.Charts.dll
Syntax
public class DataLabelTappedEventArgs : EventArgs
Constructors
DataLabelTappedEventArgs(ChartSeries, Int32, 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. |
| System.Int32 | dataIndex | Index of the data point in the series. |
| System.Object | dataItem | Original data object from ItemsSource. |
| Microsoft.Maui.Graphics.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 |
|---|
| System.Int32 |
DataItem
Gets the original data object from ItemsSource.
Declaration
public object DataItem { get; }
Property Value
| Type |
|---|
| System.Object |
Position
Gets the screen coordinates (X, Y) of the label.
Declaration
public PointF Position { get; }
Property Value
| Type | Description |
|---|---|
| Microsoft.Maui.Graphics.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 |