Articles in this section
Category / Section

How to create a vertical bar chart in .NET MAUI SfCartesianChart?

3 mins read

The .NET MAUI Cartesian Chart is an excellent tool for comparing different categories of data. This guide explains how to create your first bar chart with .NET MAUI.


Step 1: Initialize the Cartesian Chart by following these guideline.

Step 2: The Vertical Bar Chart in .NET MAUI can be obtained by using the SfCartesianChart's IsTransposed Property, as shown in the following code sample.

[XAML]

xmlns:chart="clr-namespace:Syncfusion.Maui.Charts;assembly=Syncfusion.Maui.Charts"
<chart:SfCartesianChart  IsTransposed="True">
. . .
<chart:ColumnSeries  ItemsSource="{Binding Data}" XBindingPath="Name" YBindingPath="Value"/>
</chart:SfCartesianChart>

[C#]

using Syncfusion.Maui.Charts;
SfCartesianChart chart = new SfCartesianChart()
{
     IsTransposed=true
}; 
. . .
var columnSeries = new ColumnSeries()
{
  ItemsSource= (new ViewModel()).Data,
  XBindingPath="Name",
  YBindingPath="Value"
};
chart.Series.Add(columnSeries);
this.Content = chart;

Output:

This vertical bar chart is used to visualize the years of revenue and expenses.

Conclusion

I hope you enjoyed learning how to create a vertical bar chart in .NET MAUI.

You can refer to our .NET MAUI Cartesian Chart feature tour page to learn about its other groundbreaking feature representations. Explore our .NET MAUI Cartesian Chart documentation to understand how to present and manipulate data.

For current customers, check out our .NET MAUI components from the License and Downloads page. If you are new to Syncfusion®, try our 30-day free trial to check out our .NET MAUI Cartesian Chart and other .NET MAUI components.

Please let us know in the comment section if you have any queries or require clarification. You can also contact us through our support forumsDirect-Trac, or feedback portal. We are always happy to assist you!

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please  to leave a comment
Access denied
Access denied