Best way to format labels in a BarChart

Based on the example given for creating a chart from scratch, I have the following code


foreach (var series in chart.ChartData.Series)
{
foreach (var dataPoint in series.DataPoints)
{
var lbl = dataPoint.Label;
lbl.DataLabelFormat.ShowValue = true;
lbl.DataLabelFormat.Position = LegendDataLabelPosition.InsideEnd;
lbl.TextFormat.PortionFormat.FontHeight = 10;
lbl.TextFormat.PortionFormat.FillFormat.SolidFillColor.Color = Color.White;
}
}

However, it doesn’t seem to work. Is it possible to set the label colour and format from code like this?

Previously using v8 of Aspose.Slides, I was able to set the font size using the “TextProperities” of the label to access the default portion format of the first paragraph in the label, but this approach is no longer possible in v14.2.

Hi,

Thank you for the details.

The code you are using is fine but there seems to be an issue when setting the formatting of data labels using the latest version of Aspose.Slides. The data label doesn’t appear after formatting is applied. An issue has been registered in our issue tracking system with issue id: SLIDESNET-35250 . You will be notified via this forum thread once the issue gets resolved.

Thanks & Regards,

The issues you have found earlier (filed as SLIDESNET-35250) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.