We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Data Label Issue

Hi,

I am creating bar chart. I am writing the code to display the datalabels in the chart. by adding

dataLabel.showValue = true;

dataLabel.showPercentage = true.

It is not showing the percentage. I checked in PPT we dont have option for it so that may be the reason its not supported in Aspose as well.

But in PPT we can change the Number Format to change the values to precentage value.

When i am generating the PPT and manually trying to change the Nuber Format its not chaning the Number Format to percenate.

But when i am creating Bar char manually in PPT for same data i can change the dataLabel to percentage.

I have attached the PPT for both the cases. First Slide is being generated using Aspose Slide and second slide is being generated manually for same data.

Plesse let me know how can i do the same using Aspose.Slide

Thanks,

Amit

Hi Amit,

I have tried to understand the requirement shared by you and like to share that
showPercentage property works in Aspose.Slides only for Pie charts. If you even observe in PowerPoint and navigate to label properties you will not observe the Show Percentage check box for Chart types other than Pie or Pie 3d. So, in Aspose.Slides, since chart properties are generic so showPercentage property does nothing for chart types other than Pie. I hope this will clear the concept to you.

Now, coming to percentage appearing in your chart labels. I like to share that if you set the chart data preset format to percentage the values in charts will be displayed as percent. If it is normal General value set for chart series data, the chart label will also depict them without percentage. It is not like you set the chart data format to percentage and set showPercentage=false and things will work. These two are two different things.

Many Thanks,