How to increase or decrease the width of the column series in .NET MAUI Chart (SfCartesianChart)?
The .NET MAUI Chart has support to increase or decrease the width of the column series segments. The column series contains the “Width” property, which enables you to adjust the segment’s width to your preferred value.
The value should be between 0 and 1. A value of 1 represents the full width of the column, while a value of 0.5 represents half the width. The default value of the Width property is 0.8.
The following code illustrates how to increase or decrease the width of the Column series.
[XAML]
<chart:SfCartesianChart>
...
<chart:SfCartesianChart.Series>
<chart:ColumnSeries ItemsSource="{Binding Data}" Width="0.4" XBindingPath="XValues" YBindingPath="YValues"/>
</chart:SfCartesianChart.Series>
</chart:SfCartesianChart>
[C#]
SfCartesianChart chart = new SfCartesianChart();
. . .
ColumnSeries series = new ColumnSeries()
{
ItemsSource = new ViewModel().Data,
Width = 0.4,
XBindingPath = "XValues",
YBindingPath = "YValues",
};
chart.Series.Add(series);
The following screenshot displays the column series with a width value of 0.4.
Conclusion
I hope you enjoyed learning how to increase or decrease the width of the Column series in the .NET MAUI Chart (SfCartesianChart).
Refer to our .NET MAUI Chart feature tour page to learn about its other groundbreaking feature representations. You can also explore our .NET MAUI Chart documentation to understand how to present and manipulate data.
For current customers, check out our .NET MAUI from the License and Downloads page. If you are new to Syncfusion®, try our 30-day free trial to check out our .NET MAUI Chart and other .NET MAUI components.
Please let us know in the comments section if you have any queries or require clarification. You can also contact us through our support forums, Direct-Trac, or feedback portal. We are always happy to assist you!