Articles in this section
Category / Section

How to remove the default padding of Xamarin.Forms Chart?

1 min read

By default, padding is applied to all the sides of chart to avoid the cropping of axis labels and leaving some space between nearby views and chart. However, it can be removed or changed using the ChartPadding property of Xamarin SfChart.

 

In the following code snippets shows how to customize the chart padding.

 

xaml:

<chart:SfChart   x:Name="Chart" ChartPadding ="5,5,5,5">
 
...
 
</chart:SfChart>

 

C#:

...  
 
      SfChart chart = new SfChart()
       {
           ChartPadding = new Thickness(5)
       };
 
...

 

Conclusion

I hope you enjoyed learning about how to remove the default padding of Xamarin.Forms Chart.

You can refer to our Xamarin SfChart’s feature tour page to know about its other groundbreaking feature representations. You can also explore our Xamarin SfChart documentation to understand how to present and manipulate data. 

For current customers, you can check out our Xamarin from the License and Downloads page. If you are new to Syncfusion, you can try our 30-day free trial to check out our Xamarin SfChart and other Xamarin components.

If you have any queries or require clarifications, please let us know in comments below. You can also contact us through our support forums, Direct-Trac, or feedback portal. We are always happy to assist you!

 

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment
Access denied
Access denied