-
Notifications
You must be signed in to change notification settings - Fork 2
Prepare UG Documentation for Labels Per 100 Pixels Support in .NET MAUI Cartesian Chart Axis #305
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: development
Are you sure you want to change the base?
Changes from 3 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ description: Learn here all about axis labels and its customization in Syncfusio | |
platform: maui-toolkit | ||
control: SfCartesianChart | ||
documentation: ug | ||
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. | ||
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. | ||
--- | ||
|
||
# Axis labels in .NET MAUI Chart | ||
|
@@ -250,3 +250,44 @@ this.Content = chart; | |
 | ||
|
||
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. | ||
|
||
## Maximum Labels Per 100 Pixels | ||
|
||
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 limits and manages the density of axis labels per 100 pixels, ensuring that either the specified maximum is displayed or that label spacing is optimized to maintain readability. | ||
|
||
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. | ||
|
||
{% tabs %} | ||
|
||
{% highlight xaml %} | ||
|
||
<chart:SfCartesianChart> | ||
VimalaThirumalaiKumarSF3739 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
. . . | ||
|
||
<chart:SfCartesianChart.YAxes> | ||
<chart:NumericalAxis MaximumLabels="5" /> | ||
</chart:SfCartesianChart.YAxes> | ||
. . . | ||
</chart:SfCartesianChart> | ||
|
||
{% endhighlight %} | ||
|
||
{% highlight C# %} | ||
|
||
SfCartesianChart chart = new SfCartesianChart(); | ||
VimalaThirumalaiKumarSF3739 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
. . . | ||
NumericalAxis axis = new() | ||
{ | ||
MaximumLabels = 5, | ||
}; | ||
chart.YAxes.Add(axis); | ||
. . . | ||
this.Content = chart; | ||
|
||
{% endhighlight %} | ||
|
||
{% endtabs %} | ||
|
||
 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @subash-sf modify image name as maui_chart_axis_maximum_labels There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Both in folder and here There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @subash-sf is updated image output taking with maximum label as 5? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. is image got from ux team? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @VimalaThirumalaiKumarSF3739 Yes, no There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @subash-sf yes or no? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @VimalaThirumalaiKumarSF3739 maximum labels output is taken with value 5 yes, Image did not get updated from UX team yet. |
||
|
||
N> `MaximumLabels` only applies during automatic interval calculation. It will have no effect if the `Interval` property is manually set on the axis. |
Uh oh!
There was an error while loading. Please reload this page.