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

RadChart legend visibility

2 Answers 50 Views
Chart
This is a migrated thread and some comments may be shown as answers.
John
Top achievements
Rank 1
John asked on 11 Feb 2014, 05:58 PM
I am attempting to place a RadChart with the legend collapsed within the small content RadFluidContentControl of a tileview, but setting the ChartLegend visibility to "Collapsed" does not appear to work.  However, if I utilize the same XAML code within a usercontrol and display the usercontrol in the small content RadFluidContentControl it does collapse the legend.  Any idea how to resolve this using in-line XAML within the RadFluidContentControl rather than utilize a usercontrol for the display of the chart?

My sample code for the specification of the tileview's content:

<DataTemplate x:Key="ContentTemplate">
    <telerik:RadFluidContentControl ContentChangeMode="Automatic" State="Normal" NormalToSmallThreshold="250 250" NormalToLargeThreshold="500 500">
     <telerik:RadFluidContentControl.SmallContent>
      <Grid DataContext="{Binding Source={StaticResource SampleDataSource}}">
       <telerik:RadChart x:Name="chtTrendingChart_Small" telerik:StyleManager.Theme="Windows8" ItemsSource="{Binding Collection}">
        <telerik:RadChart.DefaultView>
         <telerik:ChartDefaultView>
          <telerik:ChartDefaultView.ChartLegend>
              <telerik:ChartLegend Visibility="Collapsed" />
            </telerik:ChartDefaultView.ChartLegend>
          </telerik:ChartDefaultView>
        </telerik:RadChart.DefaultView>
       </telerik:RadChart>
      </Grid>
     </telerik:RadFluidContentControl.SmallContent>
     <telerik:RadFluidContentControl.Content>
      <local:UC_SmallGraph/>
     </telerik:RadFluidContentControl.Content>
     <telerik:RadFluidContentControl.LargeContent>
      <local:UC_LargeContent/>
     </telerik:RadFluidContentControl.LargeContent>
    </telerik:RadFluidContentControl>
   </DataTemplate>
   

2 Answers, 1 is accepted

Sort by
0
John
Top achievements
Rank 1
answered on 13 Feb 2014, 01:37 PM
Resolved the issue by modifying the code behind but still unsure as to why the visibility setting within the XAML did not work.
0
Martin Ivanov
Telerik team
answered on 14 Feb 2014, 12:26 PM
Hi John,

I am glad to hear that you have resolved the issue. However, the RadChart control has many known limitations and issues and one of those is the described issue. Therefore, we decided to create new charting components with better implementation and enhanced performance. You could read about the differences between the components in this article. 

Regards,
Martin
Telerik

Check out the new Telerik Platform - the only modular platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native apps. Register for the free online keynote and webinar to learn more about the Platform on Wednesday, February 12, 2014 at 11:00 a.m. ET (8:00 a.m. PT).

Tags
Chart
Asked by
John
Top achievements
Rank 1
Answers by
John
Top achievements
Rank 1
Martin Ivanov
Telerik team
Share this question
or