SimpleBarChart.Maui
1.0.0
dotnet add package SimpleBarChart.Maui --version 1.0.0
NuGet\Install-Package SimpleBarChart.Maui -Version 1.0.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="SimpleBarChart.Maui" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="SimpleBarChart.Maui" Version="1.0.0" />
<PackageReference Include="SimpleBarChart.Maui" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add SimpleBarChart.Maui --version 1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: SimpleBarChart.Maui, 1.0.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package SimpleBarChart.Maui@1.0.0
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=SimpleBarChart.Maui&version=1.0.0
#tool nuget:?package=SimpleBarChart.Maui&version=1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Maui.SimpleBarChart
A simple and highly customizable bar chart control for .NET MAUI apps.
Display bars with X-axis labels and Y-axis values, and customize every aspect of the chart including bar color, width, spacing, font, and label positions.
Features
- Draw bars with customizable color, width, and spacing
- Show X-axis labels (categories, days, etc.)
- Display Y-axis values either floating above each bar or in a fixed row
- Auto-centers bars horizontally within the control
- Fully customizable style:
BarColor– color of the barsBarWidth– width of each bar (0 = auto)BarSpacing– space between barsFontSize– font size for labels and valuesFontColor– font color for labels and valuesXAxisRowHeight– reserved space for X-axis labelsYAxisTopPadding– top padding of the chartXAxisLabelOffset– vertical offset for X-axis labelsShowValuesOnTop– Y-axis values above bars (true) or fixed row (false)FixedValuesRow– row position of Y-axis values ifShowValuesOnTop = false
Installation
Install via NuGet:
Install-Package Maui.SimpleBarChart -Version 1.0.0
Installation
XAML Example
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:charts="clr-namespace:Maui.SimpleBarChart.Controls;assembly=Maui.SimpleBarChart"
x:Class="YourApp.MainPage">
<Grid>
<charts:BarChartView
x:Name="SalesChart"
WidthRequest="300"
HeightRequest="300"
BarColor="DodgerBlue"
BarWidth="30"
BarSpacing="20"
FontSize="14"
FontColor="Green"
XAxisRowHeight="50"
YAxisTopPadding="40"
XAxisLabelOffset="20"
ShowValuesOnTop="False"
FixedValuesRow="25"
HorizontalOptions="Center"
VerticalOptions="Start"/>
</Grid>
</ContentPage>
C# Example
public partial class MainPage : ContentPage
{
public MainPage()
{
InitializeComponent();
SalesChart.XAxisLabels = new List<string> { "Mon", "Tue", "Wed", "Thu", "Fri" };
SalesChart.YAxisValues = new List<double> { 100, 150, 90, 130, 110 };
SalesChart.BarColor = Colors.MediumSeaGreen;
SalesChart.BarWidth = 25;
SalesChart.BarSpacing = 10;
SalesChart.FontSize = 12;
SalesChart.FontColor = Colors.Black;
SalesChart.XAxisRowHeight = 40;
SalesChart.YAxisTopPadding = 15;
SalesChart.XAxisLabelOffset = 10;
// show values on top of each bar
SalesChart.ShowValuesOnTop = true;
// if ShowValuesOnTop = false, this is the Y position of values
SalesChart.FixedValuesRow = 20;
}
}
Customization Options
| Property | Type | Default | Description |
|---|---|---|---|
BarColor |
Color | CornflowerBlue | Color of the bars |
BarWidth |
float | 0 | Width of each bar (0 = auto) |
BarSpacing |
float | 12 | Space between bars |
FontSize |
float | 12 | Font size for labels and values |
FontColor |
Color | Black | Font color for labels and values |
XAxisRowHeight |
float | 40 | Height reserved for X-axis labels |
YAxisTopPadding |
float | 10 | Padding above the chart |
XAxisLabelOffset |
float | 5 | Vertical offset for X-axis labels |
ShowValuesOnTop |
bool | true | If true, Y-axis values float above bars; else fixed row |
FixedValuesRow |
float | 5 | Row position of Y-axis values when ShowValuesOnTop = false |
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0-android36.0 is compatible. net10.0-ios26.0 is compatible. net10.0-maccatalyst26.0 is compatible. net10.0-windows10.0.19041 is compatible. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net10.0-android36.0
- Microsoft.Maui.Controls (>= 10.0.1)
-
net10.0-ios26.0
- Microsoft.Maui.Controls (>= 10.0.1)
-
net10.0-maccatalyst26.0
- Microsoft.Maui.Controls (>= 10.0.1)
-
net10.0-windows10.0.19041
- Microsoft.Maui.Controls (>= 10.0.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.0 | 100 | 2/2/2026 |
Initial release with bars, labels, and values above bars.