Hello to everybody,
I've got a pie chart with 30 pieces, some are really small and end-user cannot read the value, I was wondering if it's possible to have the Legend label item (ChartLegendItem) to show the Text with the percentage between (), for example Milan (40%), Rome (10%)
The Item mapping of the series are defined in this way :
and looking at the forum I was able to catch the style but not able to modify it :
anyone can help me on this?
Thanks
Paolo
I've got a pie chart with 30 pieces, some are really small and end-user cannot read the value, I was wondering if it's possible to have the Legend label item (ChartLegendItem) to show the Text with the percentage between (), for example Milan (40%), Rome (10%)
The Item mapping of the series are defined in this way :
sm.ItemMappings.Add(new ItemMapping("Description", DataPointMember.XCategory)); |
sm.ItemMappings.Add(new ItemMapping("Percentage",DataPointMember.YValue)); |
sm.ItemMappings.Add(new ItemMapping("Description", DataPointMember.LegendLabel)) |
and looking at the forum I was able to catch the style but not able to modify it :
<Style x:Name="CustomLegendItemStyle" TargetType="telerikCharting:ChartLegendItem"> |
<Setter Property="Foreground" Value="White" /> |
<Setter Property="FontSize" Value="9" /> |
<Setter Property="Template"> |
<Setter.Value> |
<ControlTemplate TargetType="telerikCharting:ChartLegendItem"> |
<Grid VerticalAlignment="Top"> |
<Grid.ColumnDefinitions> |
<ColumnDefinition Width="Auto" /> |
<ColumnDefinition Width="*" /> |
</Grid.ColumnDefinitions> |
<Rectangle x:Name="PART_LegendItemMarker" Style="{TemplateBinding ItemStyle}" /> |
<TextBlock Grid.Column="1" Margin="5" VerticalAlignment="Center" Text="{TemplateBinding Label}" FontSize="11" Foreground="#FFFFFFFF" /> |
</Grid> |
</ControlTemplate> |
</Setter.Value> |
</Setter> |
</Style> |
anyone can help me on this?
Thanks
Paolo