Samuel Posted July 8, 2009 Report Share Posted July 8, 2009 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 fairIs their any other possibility to force the Pie-Chart to wrap the text in Labels ? Quote Link to comment Share on other sites More sharing options...
RandyJ Posted July 27, 2009 Report Share Posted July 27, 2009 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 Quote Link to comment Share on other sites More sharing options...
rocioZ Posted July 27, 2009 Report Share Posted July 27, 2009 Unfortunately, Chart FX does not support to wrap the label text, as a workaround you will have to break the line manually, by introducing a "\n" in the middle of the string. I apologize for the inconvenience. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.