Jump to content
Software FX Community

Need to wrap label test in Pie chart


Samuel

Recommended Posts

 

Hello,

In my Pie-Charts the PointLabels will be truncated. (see attachment) I'm using the following code for initialization.

ChartAssetAllocation.Gallery = Gallery.Pie; ChartAssetAllocation.AllSeries.PointLabels.Visible = true; ChartAssetAllocation.AllSeries.PointLabels.Font = new Font("Arial", 7); ChartAssetAllocation.AllSeries.PointLabels.Format = "%l\n\r%p%%"; ChartAssetAllocation.LegendBox.Dock = DockArea.Bottom; ((ChartFX.WebForms.Galleries.Pie)ChartAssetAllocation.GalleryAttributes).ShowLines = false; ((ChartFX.WebForms.Galleries.Pie)ChartAssetAllocation.GalleryAttributes).LabelLineBreak = 10; ((ChartFX.WebForms.Galleries.Pie)ChartAssetAllocation.GalleryAttributes).MaximumLabelMargin = 15;

In other Posts in this Forum I get the information that I have to set  MaximumLabelMargin = 100. If i do so there are more space around my chart and my pie became very small. which is not fair

Is their any other possibility to force the Pie-Chart to wrap the text in Labels ?
Link to comment
Share on other sites

  • 3 weeks later...

Hi,

Unfortunately, there is no built-in feature to enable label-wrapping. However, as a workaround you can specify a line break (\n) when defining a value for the text property of the point class:

Chart1.AllSeries.PointLabels.Format =

"%L";Chart1.Points[0, 0].Text = "Line1 \n Line 2";

Regards,

RandyJ

Link to comment
Share on other sites

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.

Guest
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...