Open christiankiely opened 1 year ago
This fixes an issue when importing generated PPTX files with charts into Google Slides.
It appears Google Slides' importer does not like the use of multiLvlStrRef, and displays categories as simple numbers.
multiLvlStrRef
For example, using this code to generate a pptx file:
const pres = new pptxgen(); const slide = pres.addSlide(); slide.addChart( pres.ChartType.bar, [ { name: "Categories", labels: ["Category A", "Category B", "Category C"], values: [500, 200, 350], }, ], { x: 1, y: 1, w: 5, h: 3, } );
Appears like this in PowerPoint vs Google Slides:
Using strRef instead of multiLvlStrRef when there is only one set of labels appears to fix this issue.
strRef
This fixes an issue when importing generated PPTX files with charts into Google Slides.
It appears Google Slides' importer does not like the use of
multiLvlStrRef
, and displays categories as simple numbers.For example, using this code to generate a pptx file:
Appears like this in PowerPoint vs Google Slides:
Using
strRef
instead ofmultiLvlStrRef
when there is only one set of labels appears to fix this issue.