Closed kornarakis closed 3 years ago
According to official Microsoft documentation, you can add symbols and characters by wrapping them with ""
.
another option is to use an escaping character. so in your case you should use: \%
escaping seems to be working on PptxGenJS, but ""
seems to corrupt the file.
I'll try to fix this issue.
Issue Fixed. I'll send a PR now.
Thanks for reporting this @kornarakis
Fixed thanks to @galzo
Category
Bug
Version
Please specify what version of the library you are using: [ 3.3.1 ]
Please specify what version(s) of PowerPoint you are targeting: [ 365 ]
Expected / Desired Behavior / Question
On Bar chart type when using the
dataLabelFormatCode
with a value like#,##0.0"%"
the generated pptx file is corrupted.Observed Behavior
My demo numbers are
The expected behavior is to show the numbers on the bar charts as
15.5%
and20.3%
. The format code#,##0.0"%"
is working fine if you set it in Powerpoint directly.Steps to Reproduce
Create a bar chart with the following code