- Home
- Forum
- Xamarin.Forms
- Chart Title word wrap and alignment
Chart Title word wrap and alignment
How do i shift the chart more towards the left. i am ok with the axis label is shown in 2 line

Eg: i am ok with ASX Aplazmqw as
ASX
Aplazmqw
Further one of my chart title is too long how do i ensure the Chart Title is word wrap if too long?
My chart is placed in a SfBorder with Margin=20. it seems that the result for SfBorder container Doughnut Chart and Bar series is different
Doughnut Chart SfBorder

Bar Chart SfBorder

SIGN IN To post a reply.
3 Replies
HM
Hemalatha Marikumar
Syncfusion Team
September 9, 2019 01:01 PM UTC
Hi Benjamin,
Query 1: How do i shift the chart more towards the left. i am ok with the axis label is shown in 2 line
We can achieve your requirement by using the MaxWidth and WrappedLabelAlignment properties of axis LabelStyle, which is available in ChartAxis class. Please refer the below code.
Code snippet:
|
<chart:SfChart.PrimaryAxis>
<chart:CategoryAxis >
<chart:CategoryAxis.LabelStyle>
<chart:ChartAxisLabelStyle MaxWidth="50" WrappedLabelAlignment="Center"/>
</chart:CategoryAxis.LabelStyle>
</chart:CategoryAxis>
</chart:SfChart.PrimaryAxis> |
Query 2: Further one of my chart title is too long how do i ensure the Chart Title is word wrap if too long?
Currently there is no direct support to wrap the chart title. However you can achieve this by using the Label instead of Chart title. Please refer the below code.
Code snippet:
|
<Label Text="SLA Achievement" HorizontalOptions="Center" HorizontalTextAlignment="Center" WidthRequest="100"/> |
Query 3: My chart is placed in a SfBorder with Margin=20. it seems that the result for SfBorder container Doughnut Chart and Bar series is different
The given information and the image is not enough to reproduce the reported issue at out end. Can you please give some more information or revert us the attached sample to provide you a better solution at the earliest.
Regards,
Hemalatha M.
BE
Benjamin
September 11, 2019 03:18 AM UTC
HI.
Thanks for your reply.
i am able to solve my issue following your suggestion.
Thanks alot
MK
Muneesh Kumar G
Syncfusion Team
September 11, 2019 05:49 AM UTC
Hi Benjamin,
Thanks for the update.
We are glad to know that the given solution works. Please let us know if you need any further assistance.
Thanks,
Muneesh Kumar G.
SIGN IN To post a reply.
- 3 Replies
- 3 Participants
-
BE Benjamin
- Sep 6, 2019 08:10 AM UTC
- Sep 11, 2019 05:49 AM UTC