Skip to content

Commit 789978e

Browse files
committed
changes made
1 parent b6949de commit 789978e

File tree

3 files changed

+44
-34
lines changed

3 files changed

+44
-34
lines changed

maui-toolkit-toc.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,6 @@
116116
<li><a href="/maui-toolkit/cartesian-charts/axis/padding">Axis Padding</a></li>
117117
<li><a href="/maui-toolkit/cartesian-charts/axis/range-padding">Axis Range Padding</a></li>
118118
<li><a href="/maui-toolkit/cartesian-charts/axis/autoscrollingdelta">Auto Scrolling</a></li>
119-
<li><a href="/maui-toolkit/cartesian-charts/axis/maximumlabels">Maximum Labels</a></li>
120119
</ul>
121120
</li>
122121
<li>

maui-toolkit/Cartesian-Charts/Axis/Axislabels.md

Lines changed: 44 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: Learn here all about axis labels and its customization in Syncfusio
55
platform: maui-toolkit
66
control: SfCartesianChart
77
documentation: ug
8-
keywords: .net maui chart axis labels, axis labels customization .net maui, syncfusion maui chart axis labels, cartesian chart axis labels maui, customize axis labels .net maui chart.
8+
keywords: .net maui chart axis labels, axis labels customization .net maui, syncfusion maui chart axis labels, cartesian chart axis labels maui, customize axis labels .net maui chart, .net maui chart labels per 100 pixels.
99
---
1010

1111
# Axis labels in .NET MAUI Chart
@@ -250,3 +250,46 @@ this.Content = chart;
250250
![Smart axis lable support in .NET MAUI SfCartesianChart.](axis_images/maui_chart_smart_axis_labels.png)
251251

252252
N> If the [LabelsIntersectAction](https://help.syncfusion.com/cr/maui-toolkit/Syncfusion.Maui.Toolkit.Charts.ChartAxis.html#Syncfusion_Maui_Toolkit_Charts_ChartAxis_LabelsIntersectAction) is set to Wrap, we should set the width of the wrap using the [MaxWidth](https://help.syncfusion.com/cr/maui-toolkit/Syncfusion.Maui.Toolkit.Charts.ChartAxisLabelStyle.html#Syncfusion_Maui_Toolkit_Charts_ChartAxisLabelStyle_MaxWidth) property. We can align the wrapped axis label using the [WrappedLabelAlignment](https://help.syncfusion.com/cr/maui-toolkit/Syncfusion.Maui.Toolkit.Charts.ChartAxisLabelStyle.html#Syncfusion_Maui_Toolkit_Charts_ChartAxisLabelStyle_WrappedLabelAlignment) property.
253+
254+
## Maximum Labels Per 100 Pixels
255+
256+
The [MaximumLabels]() property in [ChartAxis](https://help.syncfusion.com/cr/maui-toolkit/Syncfusion.Maui.Toolkit.Charts.ChartAxis.html?) is an integer type property that is used to control the number of axis labels rendered for every 100 pixels of the chart axis. This feature helps maintain better label spacing and improves readability.
257+
258+
By default, a maximum of `3` labels are displayed per 100 pixels of axis. This ensures that the chart remains clean and readable without manual configuration. You can override this behavior by explicitly setting the MaximumLabels property to your desired density.
259+
260+
**XAML**
261+
262+
{% tabs %}
263+
264+
{% highlight xaml %}
265+
266+
<chart:SfCartesianChart>
267+
268+
. . .
269+
270+
<chart:NumericalAxis MaximumLabels="1" />
271+
. . .
272+
273+
</chart:SfCartesianChart>
274+
275+
{% endhighlight %}
276+
277+
**C#**
278+
279+
{% highlight C# %}
280+
281+
SfCartesianChart chart = new SfCartesianChart();
282+
. . .
283+
NumericalAxis axis = new NumericalAxis()
284+
{
285+
MaximumLabels = 1,
286+
};
287+
chart.XAxes.Add(axis);
288+
. . .
289+
this.Content = chart;
290+
291+
{% endhighlight %}
292+
293+
{% endtabs %}
294+
295+
N> [MaximumLabels]() only applies during automatic interval calculation. It will have no effect if the `Interval` property is manually set on the axis.

maui-toolkit/Cartesian-Charts/Axis/MaximumLabels.md

Lines changed: 0 additions & 32 deletions
This file was deleted.

0 commit comments

Comments
 (0)