NumberFormat set to "0%" on the DataLabels objects
of a specific DataPoint in a series, incorrectly formats as a Decimal
Syncfusion.Presentation.Wpf 220.127.116.11 (or latest 18.104.22.168) 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
The code looks
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.
project attached for VS 2022.
If not resolved, it will be
necessary to write post-Syncfusion processing code using Open XML code to fix