I am facing an issue where my chart size is decreasing when I have a legend wrapped and the label size of legend are very long
As you can see when 2 legend item can't be on the same line, the legend is reducing the size of the chart.
<chart:SfChart Margin="0,10,0,0" AreaBorderWidth="3" HeightRequest="620" HorizontalOptions="FillAndExpand" VerticalOptions="StartAndExpand">
<chart:SfChart.Title>
<chart:ChartTitle FontSize="17" FontAttributes="Bold" Text="{extensions:Translate My top }" />
</chart:SfChart.Title>
<chart:SfChart.Series>
<chart:DoughnutSeries
XBindingPath="Name"
YBindingPath="ScorePercent" StartAngle="-90" CapStyle="BothCurve" EndAngle="270" MaximumValue="100" IsStackedDoughnut="true" x:Name="doughnutSeries" ItemsSource="{Binding SpecialitiesTop}" LegendIcon="Circle" EnableAnimation="True" >
<!--<chart:DoughnutSeries.ColorModel>
<chart:ChartColorModel Palette="Custom" x:Name="colorModel" />
</chart:DoughnutSeries.ColorModel>-->
</chart:DoughnutSeries>
</chart:SfChart.Series>
<chart:SfChart.Legend>
<chart:ChartLegend BackgroundColor="Green" x:Name="legend" OverflowMode="Wrap" DockPosition="Top">
<chart:ChartLegend.ItemTemplate>
<DataTemplate>
<StackLayout Orientation="Horizontal" x:Name="root" >
<StackLayout HeightRequest="70" WidthRequest="80">
<chart:SfChart VerticalOptions="FillAndExpand" HorizontalOptions="FillAndExpand" BackgroundColor="Transparent">
<chart:SfChart.Series>
<chart:DoughnutSeries XBindingPath="Name"
YBindingPath="ScorePercent" StartAngle="-90" CapStyle="BothCurve" EndAngle="270" MaximumValue="100" CircularCoefficient="1" IsStackedDoughnut="true" x:Name="series" ItemsSource="{Binding Converter={StaticResource indexToItemSourceConverter}}" Color="{Binding IconColor}" EnableAnimation="True">
<chart:DoughnutSeries.DoughnutCoefficient>
<OnPlatform x:TypeArguments="x:Double" WinPhone="0.6" Android="0.8" iOS="0.8" />
</chart:DoughnutSeries.DoughnutCoefficient>
<chart:DoughnutSeries.CenterView>
<Image Source="{Binding BindingContext.DataPoint.Image, Converter={StaticResource url}}" HeightRequest="{Binding InnerRadius, Converter={StaticResource imageSizeConverter}}" WidthRequest="{Binding InnerRadius, Converter={StaticResource imageSizeConverter}}" HorizontalOptions="Center" VerticalOptions="Center"/>
</chart:DoughnutSeries.CenterView>
</chart:DoughnutSeries>
</chart:SfChart.Series>
</chart:SfChart>
</StackLayout>
<StackLayout Orientation="Vertical" VerticalOptions="Center" HorizontalOptions="Center">
<Label TextColor="{Binding IconColor}" FontSize="15" Text="{Binding DataPoint.ScorePercent, StringFormat='{0:N}%'}"/>
<Label TextColor="{Binding IconColor}" FontSize="15" Text="{Binding DataPoint.Score, StringFormat='{0} points'}"/>
<Label FontSize="13" VerticalTextAlignment="Center" TextColor="Black" Text="{Binding DataPoint.Name}" MaxLines="3" LineBreakMode="WordWrap" />
</StackLayout>
</StackLayout>
</DataTemplate>
</chart:ChartLegend.ItemTemplate>
</chart:ChartLegend>
</chart:SfChart.Legend>
</chart:SfChart>