This is a migrated thread and some comments may be shown as answers.

Legend Items are missing...

1 Answer 27 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Rob
Top achievements
Rank 1
Rob asked on 15 Oct 2012, 06:16 PM
Hello,

I have found a bug (I think) in the RadChart control...  For several months now, we have been using the RadChart like follows:
<telerik:RadChart x:Name="RadChart" Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="4" telerik:AnimationManager.IsAnimationEnabled="False" ItemsSource="{TemplateBinding Items}" MinFullHeight="100" MinFullWidth="100" MaxWidth="425" MaxHeight="300" Style="{StaticResource rc_style}" Background="#FFFFFFFF" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch">
   <telerik:RadChart.DefaultView>
      <telerik:ChartDefaultView>
         <telerik:ChartDefaultView.ChartArea>
            <telerik:ChartArea>
               <telerik:ChartArea.AnimationSettings>
                  <telerik:AnimationSettings ItemDelay="00:00:00.0" ItemAnimationDuration="00:00:00" />
                  </telerik:ChartArea.AnimationSettings>
               </telerik:ChartArea>
            </telerik:ChartDefaultView.ChartArea>
         </telerik:ChartDefaultView>
      </telerik:RadChart.DefaultView>
</telerik:RadChart>



Recently, we noticed that the legend items were not showing...  After some trial and error, I discovered that removing the animcation settings fixed the problem...  Can you tell me why?  I don't recall exactly why we were setting the animationsettings in the first place, or else I would just remove it.
<telerik:RadChart x:Name="RadChart" Style="{StaticResource rc_style}" Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="4" telerik:AnimationManager.IsAnimationEnabled="False" ItemsSource="{TemplateBinding Items}" MinFullHeight="100" MinFullWidth="100" MaxWidth="425" MaxHeight="300"  Background="#FFFFFFFF" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch">
</telerik:RadChart>



Please see the attached screenshot of "working" and "hidden" legend items...

1 Answer, 1 is accepted

Sort by
0
Petar Kirov
Telerik team
answered on 18 Oct 2012, 03:33 PM
Hello Rob,

The reason the ChartLegend is not displayed is actaully because by defining a ChartDefaultView, you are overriding the default one - which conatins a ChartLegend. As you can see in this help topic, when defining a ChartDefaultView, if you want a ChartLegend, you have to define one and also you have to tell the ChartArea to use is by setting its LegendName property.
 
Kind regards,
Petar Kirov
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
Chart
Asked by
Rob
Top achievements
Rank 1
Answers by
Petar Kirov
Telerik team
Share this question
or