Showing percentages on bar chart relative to maximum value

Hi There,

I would like to show percentages on chart relative to the maximum value, not the actual value itself. Is there a way to achieve that through API or I need to calculate percentages and then use style 9 to show percentage sign there?

Best Regards,
Amit

@amitkumartrips,

Well, you may try DataLabels.setShowPercentage() method for your needs, see the sample lines of code for your reference:
e.g
Sample code:

..........
DataLabels dataLabels = chart.getNSeries().get(0).getDataLabels();
dataLabels.setShowPercentage(true); 
.........

Other way can be change the source data/values (in the cells) for percentage, and then use DataLabels.NumberFormat attribute to specify the percentage formatting string.

Hope, this helps a bit.