We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Chart Title word wrap and alignment

Thread ID:

Created:

Updated:

Platform:

Replies:

147333 Sep 6,2019 08:10 AM UTC Sep 11,2019 05:49 AM UTC Xamarin.Forms 3
loading
Tags: SfChart
Benjamin
Asked On September 6, 2019 08:50 AM UTC

How do i shift the chart more towards the left. i am ok with the axis label is shown in 2 line

a

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




Hemalatha Marikumar [Syncfusion]
Replied On 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. 


Benjamin
Replied On September 11, 2019 03:18 AM UTC

HI. 

Thanks for your reply.

i am able to solve my issue following your suggestion.

Thanks alot

Muneesh Kumar G [Syncfusion]
Replied On 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. 
 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon