Hi there I am quite new to telerik controls and am trying to get item labels to appear in the legend of my pie chart. Someone recently got fired and I have taken over this piece of work so I am not entirely sure exactly how this code works at the moment. Another problem I have is when the pie slices get to thin the labels for that slice appear away from the correct slice! I've turned on showlabelconnectors as without it its hard to see exactly where some labels belong. I have managed to get each colour of the pie chart listed in the legend but no names appear next to the legend which looks normal as from looking at the code I dont see anything which could possibly show the item names. I've attached an image below of the pie chart. Currently this is what code I have:
CourseGroupUsagePieChart.Chart.Series.Clear();
CourseGroupUsagePieChart.PlotArea.XAxis.Appearance.LabelAppearance.RotationAngle = 270f;
CourseGroupUsagePieChart.PlotArea.XAxis.AutoScale = true;
CourseGroupUsagePieChart.CustomPalettes.Add(seriesPalette);
CourseGroupUsagePieChart.SeriesPalette = "seriesPalette";
ChartSeries ySeries_Pie = new ChartSeries();
ySeries_Pie.Appearance.LegendDisplayMode = ChartSeriesLegendDisplayMode.ItemLabels;
ySeries_Pie.Appearance.ShowLabelConnectors = true;
foreach (TotalReport item in totalReportCourseGroupList)
{
// x-axis
CourseGroupUsagePieChart.PlotArea.XAxis.AddItem(String.Format("{0} {1}", item.Name, item.Name));
// y-axis
ySeries_Pie.AddItem(item.TotalReportSummary.UsageSeconds, item.TotalReportSummary.UsageSeconds.ToString());
//series.AddItem(item.TotalReportSummary.UsageSeconds, item.TotalReportSummary.UsageSeconds.ToString());
}
CourseGroupUsagePieChart.AutoLayout = true;
CourseGroupUsagePieChart.AutoTextWrap = true;
CourseGroupUsagePieChart.AddChartSeries(ySeries_Pie);
Here is the asp:
<telerik:RadChart ID="CourseGroupUsagePieChart" runat="server" Width="700" Height="600" Skin="Vista" IntelligentLabelsEnabled="true" Appearance-LegendDisplayMode="ItemLabels" OnItemDataBound="CourseGroupUsagePieChart_ItemDataBound">
<ChartTitle>
<TextBlock Text="Course Group Usage - Top 10">
</TextBlock>
</ChartTitle>
</telerik:RadChart>
I've crawled through examples and demos of radcharts and cant seem to find my answer :(. Please help it will be greatly appreciated
CourseGroupUsagePieChart.Chart.Series.Clear();
CourseGroupUsagePieChart.PlotArea.XAxis.Appearance.LabelAppearance.RotationAngle = 270f;
CourseGroupUsagePieChart.PlotArea.XAxis.AutoScale = true;
CourseGroupUsagePieChart.CustomPalettes.Add(seriesPalette);
CourseGroupUsagePieChart.SeriesPalette = "seriesPalette";
ChartSeries ySeries_Pie = new ChartSeries();
ySeries_Pie.Appearance.LegendDisplayMode = ChartSeriesLegendDisplayMode.ItemLabels;
ySeries_Pie.Appearance.ShowLabelConnectors = true;
foreach (TotalReport item in totalReportCourseGroupList)
{
// x-axis
CourseGroupUsagePieChart.PlotArea.XAxis.AddItem(String.Format("{0} {1}", item.Name, item.Name));
// y-axis
ySeries_Pie.AddItem(item.TotalReportSummary.UsageSeconds, item.TotalReportSummary.UsageSeconds.ToString());
//series.AddItem(item.TotalReportSummary.UsageSeconds, item.TotalReportSummary.UsageSeconds.ToString());
}
CourseGroupUsagePieChart.AutoLayout = true;
CourseGroupUsagePieChart.AutoTextWrap = true;
CourseGroupUsagePieChart.AddChartSeries(ySeries_Pie);
Here is the asp:
<telerik:RadChart ID="CourseGroupUsagePieChart" runat="server" Width="700" Height="600" Skin="Vista" IntelligentLabelsEnabled="true" Appearance-LegendDisplayMode="ItemLabels" OnItemDataBound="CourseGroupUsagePieChart_ItemDataBound">
<ChartTitle>
<TextBlock Text="Course Group Usage - Top 10">
</TextBlock>
</ChartTitle>
</telerik:RadChart>
I've crawled through examples and demos of radcharts and cant seem to find my answer :(. Please help it will be greatly appreciated