Class ChartSegment
Represents a segment of a chart.
Inheritance
Implements
Inherited Members
Namespace: Syncfusion.Maui.Charts
Assembly: Syncfusion.Maui.Charts.dll
Syntax
public abstract class ChartSegment : INotifyPropertyChanged
Constructors
ChartSegment()
Initializes a new instance of the ChartSegment class.
Declaration
public ChartSegment()
Properties
AnimatedValue
Gets the animation value of the associated series for the segment.
Declaration
public float AnimatedValue { get; }
Property Value
| Type |
|---|
| float |
Fill
Gets or sets a brush value to customize the segment appearance.
Declaration
public Brush? Fill { get; set; }
Property Value
| Type | Description |
|---|---|
| Brush | It accepts a Microsoft.Maui.Controls.Brush value and its default value is null. |
Index
Returns the index of ChartSegment.
Declaration
public int Index { get; }
Property Value
| Type |
|---|
| int |
Item
Gets the segment data associated business model.
Declaration
public object? Item { get; }
Property Value
| Type |
|---|
| object |
Opacity
Gets or sets a value to change the opacity of the segment.
Declaration
public float Opacity { get; set; }
Property Value
| Type | Description |
|---|---|
| float | It accepts a float value and its default value is 1. Here, the value ranges from 0 to 1. |
Series
Gets the series associated with the segment.
Declaration
public ChartSeries? Series { get; }
Property Value
| Type |
|---|
| ChartSeries |
Stroke
Gets or sets a brush value to customize the border appearance of the segment.
Declaration
public Brush? Stroke { get; set; }
Property Value
| Type | Description |
|---|---|
| Brush | It accepts a Microsoft.Maui.Controls.Brush value and its default value is null. |
StrokeDashArray
Gets or sets the stroke dash array to customize the appearance of stroke.
Declaration
public DoubleCollection? StrokeDashArray { get; set; }
Property Value
| Type | Description |
|---|---|
| DoubleCollection | It accepts the Microsoft.Maui.Controls.DoubleCollection value and the default value is null. |
StrokeWidth
Gets or sets a value to change the thickness of the segment's border.
Declaration
public double StrokeWidth { get; set; }
Property Value
| Type | Description |
|---|---|
| double | It accepts a double value and its default value is 1. |
Methods
Draw(ICanvas)
Declaration
protected virtual void Draw(ICanvas canvas)
Parameters
| Type | Name | Description |
|---|---|---|
| ICanvas | canvas |
OnLayout()
Declaration
protected virtual void OnLayout()
Events
PropertyChanged
Occurs when a property value changes.
Declaration
public event PropertyChangedEventHandler? PropertyChanged
Event Type
| Type |
|---|
| PropertyChangedEventHandler |