Class StackedAreaSeries
The StackedAreaSeries is a special kind of area series which is similar to regular area series except that the Y-values stack on top of each other.
Inheritance
Implements
Inherited Members
Namespace: Syncfusion.UI.Xaml.Charts
Assembly: Syncfusion.Chart.WinUI.dll
Syntax
public class StackedAreaSeries : StackedSeriesBase, INotifyPropertyChanged
Remarks
To render a series, create an instance of StackedAreaSeries class, and add it to the Series collection.
It provides options for Fill, PaletteBrushes, Stroke, StrokeWidth, and opacity to customize the appearance.
EnableTooltip - A tooltip displays information while tapping or mouse hovering over a segment. To display the tooltip on chart, need to set the EnableTooltip property as true in StackedAreaSeries class, and also refer TooltipBehavior property.
Data Label - Data labels are used to display values related to a chart segment. To render the data labels, you need to set the ShowDataLabels property as true in StackedAreaSeries class. To customize the chart data labels alignment, placement, and label styles, you need to create an instance of CartesianDataLabelSettings and set to the DataLabelSettings property.
Selection - To enable the data point selection in a chart, create an instance of DataPointSelectionBehavior and set it to the SelectionBehavior property of the chart series. To highlight the selected segment data label, set the value for SelectionBrush property in DataPointSelectionBehavior.
Animation - To animate the series, set True to the EnableAnimation property.
LegendIcon - To customize the legend icon using the LegendIcon property.
Examples
<chart:SfCartesianChart>
<chart:SfCartesianChart.XAxes>
<chart:NumericalAxis/>
</chart:SfCartesianChart.XAxes>
<chart:SfCartesianChart.YAxes>
<chart:NumericalAxis/>
</chart:SfCartesianChart.YAxes>
<chart:StackedAreaSeries ItemsSource="{Binding Data}"
XBindingPath="XValue"
YBindingPath="YValue"/>
<chart:StackedAreaSeries ItemsSource="{Binding Data}"
XBindingPath="XValue"
YBindingPath="YValue1"/>
</chart:SfCartesianChart>
Constructors
StackedAreaSeries()
Declaration
public StackedAreaSeries()
Fields
IsClosedProperty
Identifies the IsClosed dependency property.
Declaration
public static readonly DependencyProperty IsClosedProperty
Field Value
Type | Description |
---|---|
Microsoft.UI.Xaml.DependencyProperty | The identifier for IsClosed dependency property. |
StrokeProperty
The DependencyProperty for Stroke property.
Declaration
public static readonly DependencyProperty StrokeProperty
Field Value
Type |
---|
Microsoft.UI.Xaml.DependencyProperty |
Properties
IsClosed
Gets or sets a value indicating whether the area path's stroke should be closed or open.
Declaration
public bool IsClosed { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | If its |
Remarks
To highlight the close path, set the Stroke and StrokeWidth properties in the series class.
Examples
<chart:SfCartesianChart>
<!-- ... Eliminated for simplicity-->
<chart:StackedAreaSeries ItemsSource="{Binding Data}"
XBindingPath="XValue"
YBindingPath="YValue"
IsClosed = "True"/>
</chart:SfCartesianChart>
Stroke
Gets or sets a value to customize the stroke appearance of a chart series.
Declaration
public Brush Stroke { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.UI.Xaml.Media.Brush | It accepts Microsoft.UI.Xaml.Media.Brush values and its default value is null. |
Examples
<chart:SfCartesianChart>
<!-- ... Eliminated for simplicity-->
<chart:StackedAreaSeries ItemsSource="{Binding Data}"
XBindingPath="XValue"
YBindingPath="YValue"
Stroke = "Red"
StrokeWidth = "3"/>
</chart:SfCartesianChart>
Methods
OnTapped(TappedRoutedEventArgs)
Declaration
protected override void OnTapped(TappedRoutedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.UI.Xaml.Input.TappedRoutedEventArgs | e |