NumberFormat set to "0%" on the DataLabels objects of a specific DataPoint in a series, incorrectly formats as a Decimal

NumberFormat set to "0%" on the DataLabels objects of a specific DataPoint in a series, incorrectly formats as a Decimal

 

When using Syncfusion.Presentation.Wpf 20.3.0.57 (or latest 20.4.0.49) in a WPF .Net Framework 4.6.2 desktop app, and creating a PowerPoint deck with 1 slide and 1 clustered column chart with 1 series and 3 values, and settings properties on a custom DataLabels object for the middle value including a NumberFormat of "0%" (as well as NumberFormat of "0%" on the DataLabels object of the DefaultDataPoint for the series), the data label on first and last data label format as a % as expected while the middle value is a decimal when it should also be a %.

The output looks like this:


The code looks like this:


Here is the Open XML for the series in the chart part of the PPTX file:


You can see the default <numFmt> element at the bottom for the labels <dLbls> element for the series <ser> element.

You can also see the manually added but commented-out <numFmt> element in the <dLbl> element for the middle data value bar, which if uncommented out, results in the desired behaviour of the middle data point label formatting as a %.

It appears that the SyncFusion library is writing out specific specific relative label position, but not the NumberFormat on a specified DataPoint DataLabels object, in this case the middle data point.

Simple repro project attached for VS 2022.

If not resolved, it will be necessary to write post-Syncfusion processing code using Open XML code to fix this.





Attachment: SyncFusionPPTRepro1__To_Share_b727c888.zip

1 Reply

AA Akash Arul Syncfusion Team February 16, 2023 10:50 AM UTC

We have updated the details for the reported issue in the below feedback. So, please use the below feedback for further follow up.
https://www.syncfusion.com/feedback/41062/numberformat-set-to-0-on-the-datalabels-objects-of-a-specific-datapoint-in-a


Loader.
Up arrow icon