Text overlapping in stack column chart labels

Hi Support,

23-06.PNG (14.4 KB)

I have implemented stacked column chart. in which we are facing issue related to readability in stack column label. described in above image “Outsourced services” in green bar is not readable at all because of less space available in region, similar issue in “Programs” and “System Tools” as well. My requirement is to display labels should be visible properly in any case, in any of the column green or blue. if space is not enough then label should be hidden else it should show labels.

I have attacked working demo with 20.5 version of aspose.slide. also attached image for more clarification.
ConsoleAspose.zip (247.1 KB)

@siriussynoptek,

Can you please provide the details what actually you meant by following.

There is no such option available in MS PowerPoint even. Aspose.Slides offers you set the custom position of labels in accordance to predefined label positions.

			series.DataPoints[0].Label.DataLabelFormat.Position = LegendDataLabelPosition.BestFit;

Or you can set position of label your self and it will override the pre-defined label position set.

			series.DataPoints[0].Label.X = 1;
			series.DataPoints[0].Label.Y = 0;
			series.DataPoints[0].Label.Width = 0.5;
			series.DataPoints[0].Label.Height = 0.5;

The API also give you provision to fit the label text inside the label text frame.

			series.DataPoints[0].Label.TextFormat.TextBlockFormat.AutofitType = TextAutofitType.Normal;

Apart from this there is no other mechanism for getting to know on run time, if any label text will overlap the label or not. The API provides the stated options that you may consider using on your end to serve the purpose.