Hi,
I'm building a pie chart with 10 slices programmatically and having a few problems getting the labels to show the way I want.
I have to set "chart.IntelligentLabelsEnabled = true;" otherwise the labels collide with each other.
But when I turn this on, some of the labels are just omitted altogether, which isn't acceptable.
Also I can't get label connectors to work at all.
I have set "series.Appearance.LabelAppearance.LabelConnectorStyle.Visible = true;" on the chart series, and also tried setting the equivalent property on the individual items for each pie slice as well. I also tried setting the .PenStyle & .Color properties explicitly.
Am I missing something?
Thanks,
Simon
I'm building a pie chart with 10 slices programmatically and having a few problems getting the labels to show the way I want.
I have to set "chart.IntelligentLabelsEnabled = true;" otherwise the labels collide with each other.
But when I turn this on, some of the labels are just omitted altogether, which isn't acceptable.
Also I can't get label connectors to work at all.
I have set "series.Appearance.LabelAppearance.LabelConnectorStyle.Visible = true;" on the chart series, and also tried setting the equivalent property on the individual items for each pie slice as well. I also tried setting the .PenStyle & .Color properties explicitly.
Am I missing something?
Thanks,
Simon
6 Answers, 1 is accepted
0
Accepted
Hello Simon,
You can solve the problem with the omitted labels in two ways:
As for the label connectors you should set the ShowLabelConectors property to "true". It could be useful to ensure the color of the connectors is different from the background. See the following code for reference:
Hope this helps.
Regards,
Pavel
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
You can solve the problem with the omitted labels in two ways:
- Either increase the PlotArea by decreasing the margins like this: radChart.PlotArea.Appearance.Dimensions.Margins.Left = 20;
- Or increase the distance of the label: chartSeries.Appearance.LabelAppearance.Distance = 30;.
As for the label connectors you should set the ShowLabelConectors property to "true". It could be useful to ensure the color of the connectors is different from the background. See the following code for reference:
chartSeries.Appearance.ShowLabelConnectors = true; |
chartSeries.Appearance.LabelAppearance.LabelConnectorStyle.Color = System.Drawing.Color.White; |
Hope this helps.
Regards,
Pavel
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
0

Simon
Top achievements
Rank 1
answered on 20 Mar 2008, 03:12 PM
Thanks.
I had figured out that the labels not appearing could be corrected by making the plot area a bit bigger, but hadn't seen the distance setting.
chartSeries.Appearance.ShowLabelConnectors = true;
did the trick for making the label connectors visible. Although I have no idea what LabelConnectorStyle.Visible = true is for?
- Simon
0
Hello Simon,
The LabelConnectorStyle.Visible property is "true" by default. In order to show the LabelConnectors you should set series.Appearance.ShowLabelConnectors to "true" as well. Then you can hide individual label connectors with the LabelConnectorStyle.Visible property (by setting it to false for the respective label).
I hope this explanation is clear enough.
Greetings,
Pavel
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
The LabelConnectorStyle.Visible property is "true" by default. In order to show the LabelConnectors you should set series.Appearance.ShowLabelConnectors to "true" as well. Then you can hide individual label connectors with the LabelConnectorStyle.Visible property (by setting it to false for the respective label).
I hope this explanation is clear enough.
Greetings,
Pavel
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
0

Simon
Top achievements
Rank 1
answered on 25 Mar 2008, 10:59 AM
OK, thanks.
The product seems to work very well, but to be frank I think it would be really helpful to put a bit more resource into the documentation - Just a line or two cross-referencing the entries for .ShowLabelConnectors and LabelConnectorStyle.Visible and providing some sort of context for example would be hugely helpful.
Thanks.
The product seems to work very well, but to be frank I think it would be really helpful to put a bit more resource into the documentation - Just a line or two cross-referencing the entries for .ShowLabelConnectors and LabelConnectorStyle.Visible and providing some sort of context for example would be hugely helpful.
Thanks.
0

Zhou
Top achievements
Rank 1
answered on 02 May 2012, 03:17 PM
HI,Pavel
Hi,I also have the problem!
I'm building a pie chart with 27 Series programmatically and having a few problems getting the labels to show the way I want.
ChartSeries s = new ChartSeries();
s.Type = ChartSeriesType.Pie;
s.DefaultLabelValue = "#Y, (#%{#0.##%})";
s.Appearance.ShowLabelConnectors = true;
s.Appearance.StartAngle = 30;
s.Appearance.LabelAppearance.Distance = 60;
otherwise the labels collide with each other.
some value is very samll,so the labels collide with each other . which isn't acceptable.
Also I can't get label connectors to work at all.
Am I missing something?
Thanks,
kany
Hi,I also have the problem!
I'm building a pie chart with 27 Series programmatically and having a few problems getting the labels to show the way I want.
ChartSeries s = new ChartSeries();
s.Type = ChartSeriesType.Pie;
s.DefaultLabelValue = "#Y, (#%{#0.##%})";
s.Appearance.ShowLabelConnectors = true;
s.Appearance.StartAngle = 30;
s.Appearance.LabelAppearance.Distance = 60;
otherwise the labels collide with each other.
some value is very samll,so the labels collide with each other . which isn't acceptable.
Also I can't get label connectors to work at all.
Am I missing something?
Thanks,
kany
0
Hi Kany,
Please take a look at the following forum thread where my colleague Steve have already replied to you:
http://www.telerik.com/community/forums/reporting/telerik-reporting/pie-chart---connect-labels.aspx
All the best,
Peshito
the Telerik team
Please take a look at the following forum thread where my colleague Steve have already replied to you:
http://www.telerik.com/community/forums/reporting/telerik-reporting/pie-chart---connect-labels.aspx
All the best,
Peshito
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.