Posted
on Apr 29, 2009
(permalink)
The bottom of the text strings in my pie chart legend is being cut off.... Not sure why since I am just using the basic styles.
XAML
<telerik:RadChart x:Name="ProgressChart"
Margin="4,8,4,4"
VerticalAlignment="Stretch"
HorizontalAlignment="Stretch">
<telerik:RadChart.Background>
<SolidColorBrush Color="Transparent"/>
</telerik:RadChart.Background>
</telerik:RadChart>
Code Behind
ProgressChart.Visibility = Visibility.Visible;
ProgressChart.DefaultView.ChartArea.DataSeries.Clear();
var areaSeries = new DataSeries {Definition = new PieSeriesDefinition()};
areaSeries.LegendLabel = "test";
areaSeries.Definition.ShowItemLabels = true;
areaSeries.Add(new DataPoint(_dataList.Completed, _dataList.Completed));
areaSeries.Add(new DataPoint(_dataList.Incomplete, _dataList.Incomplete));
areaSeries[0].LegendLabel = "Completed";
areaSeries[1].LegendLabel = "Incomplete";
ProgressChart.DefaultView.ChartArea.DataSeries.Add(areaSeries);
Reply
Answer
Giuseppe
Giuseppe
Posted
on Apr 30, 2009
(permalink)
Hello Greg Peter Joyal,
Unfortunately we must admit this is a bug within the legend item control template. We have added this issue to our bugtracking system and we will make sure it is fixed for the next official release of the control. As a workaround for the moment we can suggest you to use the following template for the legend item (applied via setting ChartLegend.LegendItemStyle property in code-behind):
XAML
C#
Hope this helps. We have updated your Telerik points for the report as well.
Kind regards,
Manuel
the Telerik team
Reply