Class WaterfallSeries
The WaterfallSeries shows that an initial value is affected by a series of intermediate positive or negative values, leading to a final value.
Inherited Members
Namespace: Syncfusion.Maui.Charts
Assembly: Syncfusion.Maui.Charts.dll
Syntax
public class WaterfallSeries : XYDataSeries, IDatapointSelectionDependent, ITooltipDependent, IDataTemplateDependent, IDrawCustomLegendIcon
Remarks
To render a series, create an instance of WaterfallSeries class, and add it to the Series collection.
It provides options for Fill, PaletteBrushes, StrokeWidth, and Opacity to customize the appearance.
EnableTooltip - A tooltip displays information while tapping or mouse hovering above a segment. To display the tooltip on a chart, you need to set the EnableTooltip property as true in WaterfallSeries 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 WaterfallSeries 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.
Animation - To animate the series, set True to the EnableAnimation property.
Spacing - To specify the spacing between segments using the Spacing property.
Examples
<chart:SfCartesianChart>
<chart:SfCartesianChart.XAxes>
<chart:CategoryAxis/>
</chart:SfCartesianChart.XAxes>
<chart:SfCartesianChart.YAxes>
<chart:NumericalAxis/>
</chart:SfCartesianChart.YAxes>
<chart:SfCartesianChart.Series>
<chart:WaterfallSeries
ItemsSource="{Binding Sales}"
XBindingPath="Department"
YBindingPath="Value"/>
</chart:SfCartesianChart.Series>
</chart:SfCartesianChart>
Constructors
WaterfallSeries()
Initializes a new instance of the WaterfallSeries class.
Declaration
public WaterfallSeries()
Fields
AllowAutoSumProperty
Identifies the AllowAutoSum bindable property.
Declaration
public static readonly BindableProperty AllowAutoSumProperty
Field Value
Type |
---|
Microsoft.Maui.Controls.BindableProperty |
ConnectorLineStyleProperty
Identifies the ConnectorLineStyle bindable property.
Declaration
public static readonly BindableProperty ConnectorLineStyleProperty
Field Value
Type |
---|
Microsoft.Maui.Controls.BindableProperty |
NegativePointsBrushProperty
Identifies the NegativePointsBrush bindable property.
Declaration
public static readonly BindableProperty NegativePointsBrushProperty
Field Value
Type |
---|
Microsoft.Maui.Controls.BindableProperty |
ShowConnectorProperty
Identifies the ShowConnectorLine bindable property.
Declaration
public static readonly BindableProperty ShowConnectorProperty
Field Value
Type |
---|
Microsoft.Maui.Controls.BindableProperty |
SpacingProperty
Identifies the Spacing bindable property.
Declaration
public static readonly BindableProperty SpacingProperty
Field Value
Type |
---|
Microsoft.Maui.Controls.BindableProperty |
SummaryBindingPathProperty
Identifies the SummaryBindingPath bindable property.
Declaration
public static readonly BindableProperty SummaryBindingPathProperty
Field Value
Type |
---|
Microsoft.Maui.Controls.BindableProperty |
SummaryPointsBrushProperty
Identifies the SummaryPointsBrush bindable property.
Declaration
public static readonly BindableProperty SummaryPointsBrushProperty
Field Value
Type |
---|
Microsoft.Maui.Controls.BindableProperty |
WidthProperty
Identifies the Width bindable property.
Declaration
public static readonly BindableProperty WidthProperty
Field Value
Type |
---|
Microsoft.Maui.Controls.BindableProperty |
Properties
AllowAutoSum
Gets or sets a value that determines whether the intermediate sum values in a series should be automatically calculated or not.
Declaration
public bool AllowAutoSum { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | It accepts System.Boolean values, and its default value is true. |
Examples
<chart:SfCartesianChart>
<!-- ... Eliminated for simplicity-->
<chart:WaterfallSeries ItemsSource="{Binding Sales}"
XBindingPath="Department"
YBindingPath="Value"
AllowAutoSum="False"/>
</chart:SfCartesianChart>
ConnectorLineStyle
Gets or sets a style for connector lines, and it is often used to customize the appearance of connector lines for visual purposes.
Declaration
public ChartLineStyle ConnectorLineStyle { get; set; }
Property Value
Type | Description |
---|---|
ChartLineStyle | It accepts ChartLineStyle values, and its default value is null. |
Examples
<chart:SfCartesianChart>
<!-- ... Eliminated for simplicity-->
<chart:WaterfallSeries ItemsSource="{Binding Sales}"
XBindingPath="Department"
YBindingPath="Value"/>
<chart:WaterfallSeries.ConnectorLineStyle>
<chart:ChartLineStyle Stroke="Red" >
</chart:WaterfallSeries.ConnectorLineStyle>
</chart:SfCartesianChart>
NegativePointsBrush
Gets or sets a brush value that indicates the Negative segment's interior.
Declaration
public Brush NegativePointsBrush { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.Maui.Controls.Brush | It accepts Microsoft.Maui.Controls.Brush values, and its default value is null. |
Examples
<chart:SfCartesianChart>
<!-- ... Eliminated for simplicity-->
<chart:WaterfallSeries ItemsSource="{Binding Sales}"
XBindingPath="Department"
YBindingPath="Value"
NegativePointsBrush="Red"/>
</chart:SfCartesianChart>
ShowConnectorLine
Gets or sets a value indicating whether to enable the connector line between the segements or not.
Declaration
public bool ShowConnectorLine { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | It accepts System.Boolean values, and its default value is true. |
Examples
<chart:SfCartesianChart>
<!-- ... Eliminated for simplicity-->
<chart:WaterfallSeries ItemsSource="{Binding Sales}"
XBindingPath="Department"
YBindingPath="Value"
ShowConnectorline="False"/>
</chart:SfCartesianChart>
Spacing
Gets or sets the spacing between the segments across the series in cluster mode.
Declaration
public double Spacing { get; set; }
Property Value
Type | Description |
---|---|
System.Double | It accepts System.Double values and its default value is 0d |
Examples
<chart:SfCartesianChart>
<!-- ... Eliminated for simplicity-->
<chart:WaterfallSeries ItemsSource="{Binding Sales}"
XBindingPath="Department"
YBindingPath="Value"
Spacing="1"/>
</chart:SfCartesianChart>
SummaryBindingPath
Gets or sets a string value that indicates the sum of previous segments.
Declaration
public string SummaryBindingPath { get; set; }
Property Value
Type | Description |
---|---|
System.String | It accepts System.String values, and its default value is null. |
Examples
<chart:SfCartesianChart>
<!-- ... Eliminated for simplicity-->
<chart:WaterfallSeries ItemsSource="{Binding Sales}"
XBindingPath="Department"
YBindingPath="Value"
SummaryBindingpath="IsSummary"/>
</chart:SfCartesianChart>
SummaryPointsBrush
Gets or sets a brush value that indicates the summary segment's interior.
Declaration
public Brush SummaryPointsBrush { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.Maui.Controls.Brush | It accepts Microsoft.Maui.Controls.Brush values, and its default value is string.Empty. |
Examples
<chart:SfCartesianChart>
<!-- ... Eliminated for simplicity-->
<chart:WaterfallSeries ItemsSource="{Binding Sales}"
XBindingPath="Department"
YBindingPath="Value"
SummaryPointsBrush="Blue"/>
</chart:SfCartesianChart>
Width
Gets or sets the width of each segment.
Declaration
public double Width { get; set; }
Property Value
Type | Description |
---|---|
System.Double | It accepts System.Double values and its default value is 0.8 |
Examples
<chart:SfCartesianChart>
<!-- ... Eliminated for simplicity-->
<chart:WaterfallSeries ItemsSource="{Binding Sales}"
XBindingPath="Department"
YBindingPath="Value"
Width="1"/>
</chart:SfCartesianChart>
Methods
CreateSegment()
Creates the Waterfall segments.
Declaration
protected override ChartSegment CreateSegment()
Returns
Type |
---|
ChartSegment |