Syncfusion Feedback


Overview

The .NET MAUI 100% stacked column chart displays multiple series of data as stacked columns, ensuring that the cumulative proportion of each stacked element always totals 100%. The y-axis will always render within the range 0–100. You can create beautiful, animated, real-time, and high-performance 100% stacked column charts that also support interactive features such as zooming and panning, trackball, tooltips, and selection.

.NET MAUI 100% stacked column chart documentation

.NET MAUI 100% stacked column chart.


Key features

.NET MAUI 100% stacked column chart with grouping support

Stacking group

Group a series with another series using the group name in a chart. Group the series with different stacking names separately.

.NET MAUI 100% stacked column chart with rounded corners

Rounded corners

Modernize the UI by applying rounded corners to the .NET MAUI 100% stacked column chart.

.NET MAUI 100% stacked column chart with space and width customization

Spacing and width

The .NET MAUI 100% stacked column chart provides an option to customize the spacing between two rectangles, which increases or decreases the width of the column.


Code example

Easily get started with 100% stacked column chart using a few simple lines of XAML and C# code, as demonstrated below.

  1. <ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
  2. xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
  3. x:Class="ChartExample.MainPage"
  4. xmlns:local="using:ChartExample"
  5. xmlns:chart="clr-namespace:Syncfusion.Maui.Charts;assembly=Syncfusion.Maui.Charts">
  6. <Grid>
  7. <chart:SfCartesianChart HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand">
  8. <!--Setting BindingContext-->
  9. <chart:SfCartesianChart.BindingContext>
  10. <local:ViewModel/>
  11. </chart:SfCartesianChart.BindingContext>
  12.  
  13. <!--Initialize the horizontal axis for the .NET MAUI Cartesian Chart.-->
  14. <chart:SfCartesianChart.XAxes>
  15. <chart:CategoryAxis/>
  16. </chart:SfCartesianChart.XAxes>
  17.  
  18. <!--Initialize the vertical axis for the .NET MAUI Cartesian Chart.-->
  19. <chart:SfCartesianChart.YAxes>
  20. <chart:NumericalAxis/>
  21. </chart:SfCartesianChart.YAxes>
  22. <!--Adding 100% Stacked column series to the .NET MAUI Cartesian Chart.-->
  23. <chart:SfCartesianChart.Series>
  24. <chart:StackingColumn100Series
  25. ItemsSource="{Binding Data}"
  26. XBindingPath="Month"
  27. YBindingPath="Target">
  28. </chart:StackingColumn100Series>
  29. <chart:StackingColumn100Series
  30. ItemsSource="{Binding Data}"
  31. XBindingPath="Month"
  32. YBindingPath="High">
  33. </chart:StackingColumn100Series>
  34. <chart:StackingColumn100Series
  35. ItemsSource="{Binding Data}"
  36. XBindingPath="Month"
  37. YBindingPath="Low">
  38. </chart:StackingColumn100Series>
  39. </chart:SfCartesianChart.Series>
  40. </chart:SfCartesianChart>
  41. </Grid>
  42. </ContentPage>
  1. public class Model
  2. {
  3. public string Month { get; set; }
  4. public double Target { get; set; }
  5. public double High { get; set; }
  6. public double Low { get; set; }
  7.  
  8. public Model(string xValue, double yValue, double high, double low)
  9. {
  10. Month = xValue;
  11. Target = yValue;
  12. High = high;
  13. Low = low;
  14. }
  15. }
  16. public class ViewModel
  17. {
  18. public ObservableCollection<Model> Data { get; set; }
  19. public ViewModel()
  20. {
  21. Data = new ObservableCollection<Model>()
  22. {
  23. new Model("2010", 100,90,60),
  24. new Model("2011", 120,100,80),
  25. new Model("2012", 140,120,90),
  26. new Model("2013", 160,140,100),
  27. };
  28. }
  29. }

Learning resources

Navigate to GitHub code used to configure the .NET MAUI 100% stacked column chart

GitHub Code

The .NET MAUI 100% stacked column chart configuration code is available on GitHub.

Navigate to the options available in the user guide to customize the .NET MAUI 100% stacked column chart

.NET MAUI 100% stacked column chart user guide

Learn about all the options available to customize the .NET MAUI 100% stacked column chart.

Navigate to the API reference documentation of .NET MAUI 100% stacked column chart

.NET MAUI 100% stacked column chart API reference

Explore the .NET MAUI 100% stacked column chart APIs.

Scroll up icon
Chat with us