Articles in this section
Category / Section

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

3 mins 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.Forms Chart.

 

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.Forms Chart feature tour page to know about its other groundbreaking feature representations and documentation, and how to quickly get started for configuration specifications.

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

If you have any queries or require clarifications, please let us know in the comments section below. You can also contact us through our support forumsDirect-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  to leave a comment
Access denied
Access denied