Dundas Data Visualization Support Site
Dundas Support Site Home  |  Contact Us  |  Dundas Data Visualization  
Contact Us via Email
Home

Overlapping labels in Pie or Doughnut Charts

 

Q. I have a lot of small slices on my Pie Chart. I have Point Labels enabled but they are overlapping even though I've turned on SmartLabels/"Auto Position". How can I fix this?

A. SmartLabels are not supported for Pie or Doughnut Chart Types, but there are a number of possibilities for keeping your labels from overlapping:

  • First try decreasing the font size, or increasing the size of your chart to allow more room for the labels.
  • Pie and Doughnut charts have the ability to collect smaller slices into one, and in Dundas Chart for .NET even display them in a separate, supplemental chart. We have samples that show how this is done: in our samples environment, go to Gallery >> ChartTypes >> Pie and Doughnut Charts, and see "Collecting Small Pie Segments" and "Supplemental Pie Charts" (in Windows Forms) or "Collecting Pie Slices" and "Pie Chart Small Segments" (in ASP.NET.)

    In Dundas Chart for SharePoint, you can collect slices in Advanced Properties > Series. Click the '+' to expand the custom attributes, and set the CollectedThreshold to some value.

  • If the above options do not work, or you would prefer not to change your chart in those ways, set the Series custom attribute PieLabelStyle to "Outside", so that point labels are positioned outside of the pie/doughnut with connecting lines. In Dundas Chart for SharePoint, use the Customize Your Chart wizard. On other platforms, right-click the Chart and choose Properties, open the properties for your series, and find the custom attributes. You can also use code like this:
[C#]
Chart1.Series[0]["PieLabelStyle"] = "Outside";

[VB.NET]
Chart1.Series(0)("PieLabelStyle") = "Outside";

However, you may still find that your labels overlap:

If your labels still overlap, you can spread them out by setting the ChartArea's Area3DStyle.Enable3D property to True, and adjust the Area3DStyle.XAngle property to 0 or a low value to make the Chart look 2D. You can do this in the wizards, from our properties settings, or with code:

[C#]
Chart1.ChartAreas[0].Area3DStyle.Enable3D = true;
Chart1.ChartAreas[0].Area3DStyle.XAngle = 10;

[VB.NET]
Chart1.ChartAreas(0).Area3DStyle.Enable3D = True
Chart1.ChartAreas(0).Area3DStyle.XAngle = 10

Your labels should no longer overlap:

PoorExcellent