Syncfusion Feedback


Overview

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

.NET MAUI 100% Stacked Line Chart documentation

.NET MAUI 100 percent stacked line chart.


Key features

.NET MAUI 100 percent stacked line chart with data labels.

Data labels

Data labels display information about data points. Customize the label’s foreground, border, and background. Rotate a data label by a specified angle.

.NET MAUI vertical 100 percent stacked line chart

Vertical rendering

The 100% stacked line chart can be transposed vertically to view data from a different perspective.

.NET MAUI 100 percent stacked line chart with different markers

Marker

Data points in a 100% stacked line chart are visualized as marks using built-in symbols such as crosses, squares, plus signs, inverted triangles, hexagons, ellipses, vertical lines, horizontal lines, diamonds, triangles, and pentagons.

.NET MAUI 100 percent Stacked Line chart with multiple axes

Multiple axes

Use multiple axes to plot different data sets along two or more axes, each with different data points and values.


Code example

  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"
  8. VerticalOptions="FillAndExpand">
  9. <!--Setting BindingContext-->
  10. <chart:SfCartesianChart.BindingContext>
  11. <local:ViewModel/>
  12. </chart:SfCartesianChart.BindingContext>
  13.  
  14. <!--Initialize the horizontal axis for the .NET MAUI Cartesian Chart.-->
  15. <chart:SfCartesianChart.XAxes>
  16. <chart:CategoryAxis/>
  17. </chart:SfCartesianChart.XAxes>
  18.  
  19. <!--Initialize the vertical axis for the .NET MAUI Cartesian Chart.-->
  20. <chart:SfCartesianChart.YAxes>
  21. <chart:NumericalAxis/>
  22. </chart:SfCartesianChart.YAxes>
  23. <!--Adding 100% Stacked Line Series to the .NET MAUI Cartesian Chart.-->
  24. <chart:SfCartesianChart.Series>
  25. <chart:StackingLine100Series
  26. ItemsSource="{Binding Data}"
  27. XBindingPath="Name"
  28. YBindingPath="High"
  29. ShowMarkers="True">
  30. </chart:StackingLine100Series>
  31. <chart:StackingLine100Series
  32. ItemsSource="{Binding Data}"
  33. XBindingPath="Name"
  34. YBindingPath="Low"
  35. ShowMarkers="True">
  36. </chart:StackingLine100Series>
  37. <chart:StackingLine100Series
  38. ItemsSource="{Binding Data}"
  39. XBindingPath="Name"
  40. YBindingPath="Value"
  41. ShowMarkers="True">
  42. </chart:StackingLine100Series>
  43. <chart:StackingLine100Series
  44. ItemsSource="{Binding Data}"
  45. XBindingPath="Name"
  46. YBindingPath="Size"
  47. ShowMarkers="True">
  48. </chart:StackingLine100Series>
  49. </chart:SfCartesianChart.Series>
  50. </chart:SfCartesianChart>
  51. </Grid>
  52. </ContentPage>
  1. public class Model
  2. {
  3. public string Name { get; set; }
  4. public double High { get; set; }
  5. public double Low { get; set; }
  6. public double Value { get; set; }
  7.  
  8. public double Size { get; set; }
  9.  
  10. public Model(string name, double high, double low, double value,double size)
  11. {
  12. Name = name;
  13. High = high
  14. Low = low
  15. Value = value
  16. Size = size
  17. }
  18. }
  19.  
  20. public class ViewModel
  21. {
  22. public ObservableCollection<Model> Data { get; set; }
  23.  
  24. public ViewModel()
  25. {
  26. Data = new ObservableCollection<Model>()
  27. {
  28. new Model("Mon", 100,90,60,150),
  29. new Model("Tue", 120,100,80,140),
  30. new Model("Wed", 140,120,90,160),
  31. new Model("Thu", 160,140,100,180),
  32. new Model("Fri", 160,140,100,180),
  33. new Model("Sat", 160,140,100,180),
  34. };
  35. }
  36. }

Learning resources

Navigate to GitHub code used to configure the .NET MAUI 100 percent Stacked Line chart

GitHub Code

The .NET MAUI 100% Stacked Line chart configuration code is available on GitHub.

Navigate to the options available in the User Guide to customize the .NET MAUI 100 percent stacked line chart.

.NET MAUI 100 percent Stacked Line Chart User Guide

Learn available options to customize the .NET MAUI 100% Stacked Line chart.

Navigate to the API references documentation of .NET MAUI 100 percent Stacked Line chart

.NET MAUI 100% Stacked Line Chart API References

Explore the .NET MAUI 100% Stacked Line chart APIs.

Scroll up icon
Chat with us