Jump to content
Software FX Community

Render pie chart label only if readable


Recommended Posts


 I have a pie chart with a truncated label or better said, the label is totally clipped!

The problem now is, that the black line pointing to that label is still rendered... - is there a way to deny this?

Thanks a lot in advance!






Link to comment
Share on other sites

  • 2 weeks later...


You can use the Offset property which allows you to customize the point label position by configuring its coordinates. The following code sets the PointLabelOffset to 4 pixels up and 5 pixels to the right:

chart1.AllSeries.PointLabels.Offset = new Point(4,5);

You can also modify the pointlabel's angle by specifying the angle property. This way you can also avoid collisions. You just need to use a positive number to rotate the labels from lower left to upper right. Use negative degrees to rotate text from upper left to lower right.

To set the PointLabels angle for all the series to 45:

chart1.AllSeries.PointLabels.Angle = 45;

You can also completely hide the pointlabel for a specific point (as in your case):

chart1.Points[1,1].PointLabels.Visible = true;



Link to comment
Share on other sites

  • 4 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...