Customize the SfChart padding
11 Sep 20231 minute to 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 SfChart
.
The following code example shows how to customize the padding of chart.
<chart:SfChart x:Name="Chart" ChartPadding ="5,5,5,5">
...
</chart:SfChart>
...
SfChart chart = new SfChart()
{
ChartPadding = new Thickness(5)
};
...