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. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Reduce the margin between the axis, title and border

Thread ID:





141424 Dec 11,2018 10:00 AM UTC Dec 11,2018 12:17 PM UTC Xamarin.Forms 1
Tags: SfChart
Albert K
Asked On December 11, 2018 10:00 AM UTC

How do I reduce the space marked by the red rectangles on both axis? .  Thank you.

Michael Prabhu M [Syncfusion]
Replied On December 11, 2018 12:17 PM UTC

Hi Albert K, 

Greetings from Syncfusion. You can resolve “margin between axis” by setting the Margin and BorderWidth as Zero to the ChartAxis LabelStyle and Title for respective axis. And also, you can resolve “margin between chart and rangenavigator” by setting Chart, RangeNavigator Margin and StackLayout Padding and Spacing as Zero.  Please refer below code snippet. 

Code Snippet[C#] 

Chart.PrimaryAxis = new DateTimeAxis(); 
Chart.PrimaryAxis.Title.Text = "Date"; 
Chart.PrimaryAxis.Title.Margin = new Thickness(0); 
Chart.PrimaryAxis.Title.BorderWidth = 0; 
Chart.PrimaryAxis.LabelStyle.Margin = new Thickness(0); 
Chart.PrimaryAxis.LabelStyle.BorderThickness = new Thickness(0); 
Chart.SecondaryAxis = new NumericalAxis(); 
Chart.SecondaryAxis.Title.Text = "Pressure"; 
Chart.SecondaryAxis.Title.Margin = new Thickness(0); 
Chart.SecondaryAxis.Title.BorderWidth = 0; 
Chart.SecondaryAxis.LabelStyle.Margin = new Thickness(0); 
Chart.SecondaryAxis.LabelStyle.BorderThickness = new Thickness(0); 
RangeNavigator.Margin = 0; 
Chart.Margin = 0; 
Layout.Padding = 0; 
Layout.Spacing = 0; 

And we have prepared a sample for your requirement and you can download the sample from the below link. 





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