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

Free Support Forum - aspose.com

PIE Chart Creation Show value and Percentage Value Number format settings

In Pie chart i like to show both Value and percentage and category text. We enabled by setting the following properties

datalabels.NumberFormat = “0%”;
datalabels.ShowCategoryName = true;
datalabels.ShowValue = true;
datalabels.ShowPercentage = true;
but i want to show value in different number format how can set settings.

Hi,


You may set Datalabels.NumberFormat to specify your desired formatting string but it would show for Percentage value.
e.g
Sample code:

datalabels.NumberFormat = “0.0%”;


The ShowValue would display the original value from the source range of cells. I am not entirely certain what do you want to achieve, could you create a sample file containing your desired chart with your desired formatting for the value in MS Excel manually, save the file and post us here, we will check how to do it via Aspose.Cells APIs. Also provide steps to accomplish your needs in MS Excel. We will check it soon.

Thank you.