Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

addChart and addImage in the same slide cause an error when trying to open the downloaded ppt #655

Closed
yutolkacheva opened this issue Jan 23, 2020 · 1 comment
Assignees
Milestone

Comments

@yutolkacheva
Copy link

Hello!

I have trying create a slide with both image and chart, but it cause an error when trying to open the downloaded ppt.
Could you help me, please?

PowerPoint version 2016
PptxGenJS version 3.0.1

Code sample is below:

const pptx = new PptxGenJS(); 
const slide = pptx.addSlide();

slide.addImage({ path:'https://upload.wikimedia.org/wikipedia/en/a/a9/Example.jpg', x:4, y:1, w:6, h:4 });
const dataChartRadar = [
  {
    name  : 'Region 1',
    labels: ['May', 'June', 'July', 'August', 'September'],
    values: [26, 53, 100, 75, 41]
   }
];
slide.addChart( pptx.charts.RADAR, dataChartRadar, { x:0.5, y:0.6, w:4.0, h:2, radarStyle:'standard' } );
pptx.writeFile("example");

This is what is displayed when open ppt and what is on the slide:

Screenshot 2020-01-23 at 09 25 03

Screenshot 2020-01-23 at 09 33 48

Thank you in advance!

@gitbrent gitbrent self-assigned this Jan 29, 2020
@gitbrent gitbrent added this to the 3.1.1 milestone Jan 30, 2020
gitbrent added a commit that referenced this issue Jan 30, 2020
gitbrent added a commit that referenced this issue Jan 30, 2020
@gitbrent
Copy link
Owner

@JuliaSheleva - thanks for reporting this and for the clear details.

Issue is now resolved via new method to return relID on demand to all library methods insuring consistency in ID generation.

Screen Shot 2020-01-29 at 21 56 22

ericrockey pushed a commit to WeTransfer/PptxGenJS that referenced this issue Mar 24, 2020
ericrockey pushed a commit to WeTransfer/PptxGenJS that referenced this issue Mar 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants