---
title: "Chart of the Week: Creating a .NET MAUI Waterfall Chart to Track Monthly Sales"
published_at: "2023-06-08T11:10:50+00:00"
modified_at: "2026-01-09T08:15:20+00:00"
url: "https://www.syncfusion.com/blogs/post/dotnet-maui-waterfall-chart-track-monthly-sales"
excerpt: "In this blog, we will use the Syncfusion .NET MAUI waterfall chart to track monthly sales details for a year and look at accompanying code examples."
taxonomy_category:
  - ".NET MAUI"
  - "Chart"
  - "Chart of the week"
  - "Desktop"
  - "Development"
  - "Mobile"
taxonomy_post_tag:
  - ".NET MAUI"
  - "Charts"
  - "desktop"
  - "MAUI"
  - "Mobile"
---

[Chart of the week](https://www.syncfusion.com/blogs/category/chart-of-the-week)
# Chart of the Week: Creating a .NET MAUI Waterfall Chart to Track Monthly Sales

[Vimala Thirumalai Kumar](https://www.syncfusion.com/blogs/author/vimala-thirumalai-kumar)

![Chart of the Week: Creating a .NET MAUI Waterfall Chart to Track Monthly Sales](https://www.syncfusion.com/blogs/wp-content/uploads/2023/06/Chart-of-the-Week-Creating-a-.NET-MAUI-Waterfall-Chart-to-Track-Monthly-Sales.png)


Welcome to our **Chart of the Week** blog series.

This blog will use the Syncfusion [.NET MAUI waterfall chart](https://www.syncfusion.com/maui-controls/maui-cartesian-charts/chart-types/maui-waterfall-chart)
 to track monthly sales data. Waterfall charts are useful for plotting the cumulative effect of a set of provided positive and negative values. The waterfall series is represented by rectangles and a connector between them.

The following waterfall chart shows the monthly sales for a year, depicting the funds gained or lost each month.![Visualizing monthly sales data using .NET MAUI Waterfall Chart](https://www.syncfusion.com/blogs/wp-content/uploads/2023/05/NET-MAUI-Waterfall-Chart.png)

Let’s start creating a graph of net cash flow using the Syncfusion .NET MAUI waterfall chart.

## Step 1: Gathering data

To create a waterfall chart, first, we need to gather the data. Here, we are going to use randomly generated data. Waterfall charts can be used to analyze and compare the cash flows of various business aspects, such as entire companies, [marketing campaigns](https://smartreach.io/blog/cross-channel-marketing/)
, and individual stores.

## Step 2: Populate data for the chart

Let’s define the **NetCashFlowModel** class. This class will store the month, fund, and summary details of the sales using the ** Month**, ** Fund**, and ** IsSum** properties.

Refer to the following code example.

```
public class NetCashFlowModel
{
    public string Month { get; set; }
    public double Fund { get; set; }
    private bool isSum = false;
    public bool IsSum
    {
        get {return isSum;}
        set {isSum = value;}
    }
}
```

Then, generate the data collection for net cash flow using the **NetCashFlow** class.

```
Public class NetCashFlow
{
    public NetCashFlow()
    {
        Data = new List<NetCashFlowModel>();
        Data.Add(new NetCashFlowModel() { Month = “Jan”, Fund = 2500 });
        Data.Add(new NetCashFlowModel() { Month = “Feb”, Fund = 2250 });
        Data.Add(new NetCashFlowModel() { Month = “Mar”, Fund = -1000 });
        Data.Add(new NetCashFlowModel() { Month = “Apr”, Fund = 2300 });
        Data.Add(new NetCashFlowModel() { Month = “May”, Fund = 700 });
        Data.Add(new NetCashFlowModel() { Month = “Jun”, Fund = -1500 });
        Data.Add(new NetCashFlowModel() { Month = “Jul”, Fund = -800 });
        Data.Add(new NetCashFlowModel() { Month = “Aug”, Fund = -600 });
        Data.Add(new NetCashFlowModel() { Month = “Sep”, Fund = -900 });
        Data.Add(new NetCashFlowModel() { Month = “Oct”, Fund = 2250 });
        Data.Add(new NetCashFlowModel() { Month = “Nov”, Fund = 1200 });
        Data.Add(new NetCashFlowModel() { Month = “Dec”, Fund = -3000 });
        Data.Add(new NetCashFlowModel() { Month = “Total”, IsSum=true });
    }
    public List<NetCashFlowModel> Data { get; set; }
}
```

## Step 3: Configure Syncfusion .NET MAUI Charts

Now, configure the Syncfusion .NET MAUI Charts control by referring to this [documentation](https://help.syncfusion.com/maui/cartesian-charts/getting-started)
.

Refer to the following code example.

```
<Chart:SfCartesianChart x:Name=”chart”>
 <Chart:SfCartesianChart.Xaxes>
  <Chart:CategoryAxis>
  </Chart:CategoryAxis>
 </Chart:SfCartesianChart.Xaxes>
 <Chart:SfCartesianChart.Yaxes>
  <Chart:NumericalAxis>
  </Chart:NumericalAxis>
 </Chart:SfCartesianChart.Yaxes>
</Chart:SfCartesianChart>
```

## Step 4: Binding data to the waterfall chart

To bind net cash flow data to our chart, we‘ll use the Syncfusion [WaterfallSeries](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Charts.WaterfallSeries.html)
 class.

Refer to the following code example.

```
<Chart:WaterfallSeries XBindingPath="Month" YBindingPath="Fund" SummaryBindingPath="IsSum" ItemsSource="{Binding Data}">
</Chart:WaterfallSeries>
```

In the previous code example, we’ve bound the **ItemsSource** property with a collection of net cash flow data from the ** NetCashFlow** class. The ** XBindingPath** and ** YBindingPath**are bound with the ** Month** and ** Fund** properties which indicate the data points that need to be used for the x- and y-axes, respectively. [SummaryBindingPath](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Charts.WaterfallSeries.html#Syncfusion_Maui_Charts_WaterfallSeries_SummaryBindingPath)
 provides the summary values of the series based on its associated property’s (**IsSum**) Boolean flag value.

## Step 5: Customizing the chart appearance

We can enhance the appearance of our waterfall chart by customizing various elements, such as the appearance of axis elements, series, and titles.

Let’s add a title to the chart to provide a quick overview of the plotted data. Refer to the following code example.

```
<Chart:SfCartesianChart.Title>
 <Label Text="Net Cash Flow" HorizontalTextAlignment="Center" TextColor="#FF455E7A" FontSize="Title" FontAttributes="Bold"/>
</Chart:SfCartesianChart.Title>
```

Then, customize the appearance of the axis elements using the following code example.

```
<Chart:SfCartesianChart.XAxes>
 <Chart:CategoryAxis ShowMajorGridLines="False">
  <Chart:CategoryAxis.MajorTickStyle>
   <Chart:ChartAxisTickStyle StrokeWidth="0"/>
  </Chart:CategoryAxis.MajorTickStyle>
  <Chart:CategoryAxis.LabelStyle>
   <Chart:ChartAxisLabelStyle FontSize="15"/>
  </Chart:CategoryAxis.LabelStyle>
 </Chart:CategoryAxis>
</Chart:SfCartesianChart.XAxes>
<Chart:SfCartesianChart.YAxes>
 <Chart:NumericalAxis IsVisible="False"
                      Maximum="8000"
                      ShowMajorGridLines="False"/>
</Chart:SfCartesianChart.YAxes>
```

We can modify the appearance of the waterfall series by customizing the color of the segments and by enabling connector lines and data labels for the series. We can customize the segment color based on its functionality using the [NegativePointsBrush](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Charts.WaterfallSeries.html#Syncfusion_Maui_Charts_WaterfallSeries_NegativePointsBrush)
 and [SummaryPointsBrush](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Charts.WaterfallSeries.html#Syncfusion_Maui_Charts_WaterfallSeries_SummaryPointsBrush)
 properties. The **NegativePointsBrush** is used to fill the negative segments of the series, while the ** SummaryPointsBrush** is used to fill the summary segments of the series.

```
<Chart:WaterfallSeries NegativePointsBrush="#FFFE1A67" Fill="#FF4CC0C0" SummaryPointsBrush="#FFA9CF41"/>
```

To add connector lines and data labels in the chart, use the [ShowConnectorLine](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Charts.WaterfallSeries.html#Syncfusion_Maui_Charts_WaterfallSeries_ShowConnectorLine)
 and [ShowDataLabels](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Charts.ChartSeries.html#Syncfusion_Maui_Charts_ChartSeries_ShowDataLabels)
 properties. Refer to the following code example.

```
<Chart:WaterfallSeries ShowDataLabels="True" ShowConnectorLine="True">
 <Chart:WaterfallSeries.ConnectorLineStyle>
  <Chart:ChartLineStyle StrokeDashArray="1,1" StrokeWidth="1" Stroke="black"/>
 </Chart:WaterfallSeries.ConnectorLineStyle>
 <Chart:WaterfallSeries.DataLabelSettings>
  <Chart:CartesianDataLabelSettings LabelPlacement="Outer" UseSeriesPalette="False">
   <Chart:CartesianDataLabelSettings.LabelStyle>
    <Chart:ChartDataLabelStyle LabelFormat="$#,##"/>
   </Chart:CartesianDataLabelSettings.LabelStyle>
  </Chart:CartesianDataLabelSettings>
 </Chart:WaterfallSeries.DataLabelSettings>
</Chart:WaterfallSeries>
```

After executing the previous code examples, we’ll output an image similar to the following image.

![Visualizing Monthly Sales Data Using Syncfusion .NET MAUI Waterfall Chart](https://www.syncfusion.com/blogs/wp-content/uploads/2023/05/Visualizing-Monthly-Sales-Data-Using-Syncfusion-.NET-MAUI-Waterfall-Chart.png)

Visualizing Monthly Sales Data Using Syncfusion .NET MAUI Waterfall Chart

## GitHub reference

For more information, refer to the [Creating a Waterfall Chart to Track Monthly Sales](https://github.com/SyncfusionExamples/Creating-a-Waterfall-Chart-to-track-monthly-Sales)
 project on GitHub.

## Conclusion

Thanks for reading! In this blog, we’ve seen how to visualize monthly sales data using the Syncfusion [.NET MAUI waterfall chart](https://www.syncfusion.com/maui-controls/maui-cartesian-charts/chart-types/maui-waterfall-chart)
. This helps us visualize trends and changes in net cash flow over a period. We encourage you to follow the steps provided in this blog and share your thoughts in the comments below.

You can also contact us via our [support forum](https://www.syncfusion.com/forums)
, [support portal](https://support.syncfusion.com/)
, or [feedback portal](https://www.syncfusion.com/feedback)
. We are always happy to assist you!

## Related blogs

- [Easily Replicate a Sign-Up UI in .NET MAUI](https://www.syncfusion.com/blogs/post/replicate-sign-up-ui-dotnet-maui.aspx)
- [Time Regions in .NET MAUI Scheduler—An Overview](https://www.syncfusion.com/blogs/post/time-regions-dotnet-maui-scheduler.aspx)
- [A Smoother User Experience with Image Caching in .NET MAUI](https://www.syncfusion.com/blogs/post/image-caching-in-dotnet-maui.aspx)
- [Chart of the Week: Creating a .NET MAUI Inversed Column Chart to Visualize Meta Reality Labs’s Yearly Operating Loss](https://www.syncfusion.com/blogs/post/dotnet-maui-inversed-column-chart-visualize-yearly-operating-loss-data.aspx)
