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

Chart Legend

2 Answers 104 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Tim
Top achievements
Rank 1
Tim asked on 23 Nov 2015, 08:41 PM

Hello,

I'm attempting to display a chart legend but I'm running into an issue. The Title of series (there are three series) displays but the colour portion of the legend is not being displayed. I have tried both forms below:

<telerikPrimitives:RadLegendControl LegendProvider="{Binding ElementName=someChart}" Grid.Row="3">

and  

<DataTemplate>
  <StackPanel Orientation="Horizontal">
  <Ellipse Fill="{Binding Fill}" Stroke="{Binding Stroke}" StrokeThickness="1" Width="10" Height="10"/>
  <TextBlock Text="{Binding Title}" Foreground="{Binding Fill}" Margin="10"/>
  </StackPanel>
</DataTemplate>

 

I inspected the items being bound to the Ellipse and TextBlock and they're LegendItem's but it seems that the Fill and Stroke aren't set to anything.

Is this a known issue?

Notes that I'm using UI for Universal Windows Platform (version 2015.3.1117).

Thanks,

Tim

 


 
 
 

2 Answers, 1 is accepted

Sort by
0
Pavel R. Pavlov
Telerik team
answered on 26 Nov 2015, 08:49 AM
Hi Tim,

I tried to reproduce the reported issue on our side using the code from this article (along with your customized ItemTemplate) and the 2015.2.1117.45 version of our controls. It seems that the code works as expected and I could not see any issues during building or running the test application.
I would like to turn your attention to the fact that there is a palette applied to the RadCartesianChart.

Please ensure there is a palette applied to your chart and try your custom application one more time.

Regards,
Pavel R. Pavlov
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Tim
Top achievements
Rank 1
answered on 30 Nov 2015, 07:53 PM

Hi Pavel,

Thank you for the reply, you are right on the money, I didn't have a palette applied to my chart, my bad.

Thanks,
Tim.

Tags
Chart
Asked by
Tim
Top achievements
Rank 1
Answers by
Pavel R. Pavlov
Telerik team
Tim
Top achievements
Rank 1
Share this question
or