Hi there,
I would like to use the legend for my pie chart. Since it might happen that around 10-20 different slices are being populated the according legend items need a lot of space. So I have tried to put the legend inside a scrollview, but no matter which constellation I have tested (grid row with fixed height, with * height, with auto height, stackview instead of grid, fixed size on the scrollview etc.) the scrollbar is almost never shown. Only when I manually set the height of the legend higher then the height of the scrollview a scrollbar is shown, but in this case I cannot really estimate what a correct size for the legend would be.
Is there any possiblity at all to make the legend scrollable?
Here is my xaml example:
<AbsoluteLayout HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand" Padding="0">
<Grid AbsoluteLayout.LayoutFlags="All" AbsoluteLayout.LayoutBounds="0,0,1,1"
Padding="0" Margin="0">
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="300" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<telerikChart:RadPieChart x:Name="performanceChart" Grid.Row="0" Grid.Column="0" Margin="30,30,30,30">
<telerikChart:RadPieChart.Series>
<telerikChart:PieSeries DisplayName="RequestsTotal" LegendTitleBinding="ServiceNameWithRequestsTotal"
ItemsSource="{Binding GraphDataByServiceName}" ValueBinding="RequestsTotal"/>
</telerikChart:RadPieChart.Series>
</telerikChart:RadPieChart>
<ScrollView Grid.Row="1" Grid.Column="0" Margin="15,0,15,0" HorizontalScrollBarVisibility="Never"
VerticalOptions="FillAndExpand" Orientation="Vertical">
<telerikChart:RadLegend LegendItemFontColor="{StaticResource ListItemTextBright}" HorizontalOptions="FillAndExpand"
VerticalOptions="FillAndExpand" LegendItemFontSize="15"
LegendProvider="{x:Reference Name=performanceChart}" Orientation="Vertical"/>
</ScrollView>
</Grid>
<StackLayout AbsoluteLayout.LayoutFlags="PositionProportional"
AbsoluteLayout.LayoutBounds="0.5,0.5,-1,-1">
<ActivityIndicator VerticalOptions="Center" HorizontalOptions="Center" IsVisible="{Binding IsLoading}"
IsRunning="{Binding IsLoading}"/>
</StackLayout>
</AbsoluteLayout>