This question is locked. New answers and comments are not allowed.
Hello
I am trying to allow the legend to be a static width and scroll when the number of items are too many to fit. I have the following so far:
the issue is that there is never any data displayed. Any ideas on how to do this?
Nick
I am trying to allow the legend to be a static width and scroll when the number of items are too many to fit. I have the following so far:
| <telerikChart:RadChart x:Name="RadChart1" UseDefaultLayout="False"> |
| <Grid> |
| <Grid.RowDefinitions> |
| <RowDefinition Height="1*" /> |
| <RowDefinition Height="9*" /> |
| </Grid.RowDefinitions> |
| <Grid.ColumnDefinitions> |
| <ColumnDefinition Width="9*" /> |
| <ColumnDefinition Width="1*" /> |
| </Grid.ColumnDefinitions> |
| <Grid.Resources> |
| <ResourceDictionary> |
| <Style x:Key="MyCustomLegendStyle" TargetType="Chart:ChartLegend"> |
| <Setter Property="ItemsPanel" > |
| <Setter.Value> |
| <ItemsPanelTemplate> |
| <StackPanel Orientation="Vertical" /> |
| </ItemsPanelTemplate> |
| </Setter.Value> |
| </Setter> |
| </Style> |
| </ResourceDictionary> |
| </Grid.Resources> |
| <ScrollViewer Grid.Row="1" Grid.Column="1" HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Auto"> |
| <Chart:ChartLegend x:Name="ChartLegend1" Header="Legend" |
| Style="{StaticResource MyCustomLegendStyle}" HorizontalAlignment="Left"/> |
| </ScrollViewer> |
| <Chart:ChartArea x:Name="ChartArea1" Grid.Row="1" Grid.Column="0" LegendName="ChartLegend1"/> |
| <Chart:ChartTitle Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" x:Name="ChartTitle1" |
| VerticalAlignment="Top" HorizontalAlignment="Left"/> |
| </Grid> |
| </telerikChart:RadChart> |
the issue is that there is never any data displayed. Any ideas on how to do this?
Nick