Legend area disappear after adding tooltip

3 posts, 1 answers
  1. Naren
    Naren avatar
    53 posts
    Member since:
    Aug 2010

    Posted 18 Nov 2010 Link to this post

    hi,

    After adding tooltip( as shown bold below) inside chart, chart legend area (right side area displaying legend & series list) does not get visible......

    Can anyone help me?

    <telerik:RadChart HorizontalAlignment="Left"  Margin="0,0,0,0" x:Name="radChart1" VerticalAlignment="Top" Height="Auto" BorderBrush="#FF313131" Foreground="White" AxisForeground="Black" AxisElementBrush="White" Grid.ColumnSpan="2" BorderThickness="1" Grid.Column="1"  >
                                        <telerik:RadChart.Background>
                                            <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                                <GradientStop Color="#FFEBEBEB" Offset="0.991"/>
                                                <GradientStop Color="White"/>
                                            </LinearGradientBrush>
                                        </telerik:RadChart.Background>
                                        <telerik:RadContextMenu.ContextMenu>
                                            <telerik:RadContextMenu x:Name="ContextMenu" ItemClick="ContextMenu_ItemClick" Opened="ContextMenu_Opened">
                                                <telerik:RadMenuItem x:Name="mnuItem" Header="Menu Item 1" />
                                            </telerik:RadContextMenu>
                                        </telerik:RadContextMenu.ContextMenu>
                                        <telerik:RadChart.DefaultView>
                                            <telerik:ChartDefaultView>
                                                <telerik:ChartDefaultView.ChartArea>
                                                    <telerik:ChartArea ItemToolTipOpening="ChartArea_ItemToolTipOpening" />
                                                </telerik:ChartDefaultView.ChartArea>
                                            </telerik:ChartDefaultView>
                                        </telerik:RadChart.DefaultView>

                                    </telerik:RadChart>

    Note : Legend (chart legend name)  is set to empty string as per our requirement.

    Thanks
  2. Answer
    Nikolay
    Admin
    Nikolay avatar
    397 posts

    Posted 22 Nov 2010 Link to this post

    Hi Naren,

    Do you mean that the Legend header has to an empty string and not the LegendName property? If you predefine the Default View, be sure that the ChartArea has its property LegendName set to the name of the created legend. Otherwise, your legend items will not be auto generated.Here is a sample code snippet :
    <telerikChart:RadChart x:Name="RadChart1">
       <telerikChart:RadChart.DefaultView>
           <telerikCharting:ChartDefaultView>
               <telerikCharting:ChartDefaultView.ChartLegend>
                   <telerikCharting:ChartLegend x:Name="chartLegend" Header="" UseAutoGeneratedItems="True" />
               </telerikCharting:ChartDefaultView.ChartLegend>
               <telerikCharting:ChartDefaultView.ChartArea>
                   <telerikCharting:ChartArea LegendName="chartLegend">
                   </telerikCharting:ChartArea>
               </telerikCharting:ChartDefaultView.ChartArea>
      
           </telerikCharting:ChartDefaultView>
       </telerikChart:RadChart.DefaultView>
    </telerikChart:RadChart>

    For more information on Chart Legend, please, refer to this help topic.

    Greetings,
    Nikolay
    the Telerik team
    Browse the videos here>> to help you get started with RadControls for Silverlight
  3. Naren
    Naren avatar
    53 posts
    Member since:
    Aug 2010

    Posted 22 Nov 2010 Link to this post

    Thank you ....it was helpful
Back to Top