We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Getting a Blank Slide while Generating Map Chart for a PowerPoint Presentation

I am trying this way to create a map chart. But unfortunately getting a blank slide.

import aspose.slides as slides    
with slides.Presentation() as pres:
    chart = pres.slides[0].shapes.add_chart(slides.charts.ChartType.MAP, 50, 50, 500, 400, False)
    pres.save("mapChart.pptx", slides.export.SaveFormat.PPTX)

Also, I have tried to clone a chart from another ppt. It shows as a picture frame instead of a chart object.
This issue is mainly faced for map and map tree charts

using aspose python version: Aspose.Slides== 22.12.0
ubuntu: 22.04

Screenshot from 2023-01-25 21-15-09.png (2.7 KB)

@anantutkpd,
Thank you for contacting support. I am working on the issue you described and will get back to you ASAP.

1 Like

any idea on this? we are on some critical bugs

@anantutkpd,
Unfortunately, the code example above throws a NullReferenceException error on my end. Could you please confirm that this is also happening on your end?

import aspose.slides as slides    
with slides.Presentation() as pres:
    chart = pres.slides[0].shapes.add_chart(slides.charts.ChartType.MAP, 50, 50, 500, 400, True)
    # or
    # chart = pres.slides[0].shapes.add_chart(slides.charts.ChartType.MAP, 50, 50, 500, 400)
    pres.save("mapChart.pptx", slides.export.SaveFormat.PPTX)

Try removing the last parameter in add_chart function or make it True it won’t generate any error but getting a slide without the chart added.

@anantutkpd,
Could you please share your output presentation file? You can zip the file and upload an archive here.

Here in the screenshot, you can see that an OLE object (ChartObject) was created but it’s not visible.
I have faced the same issue when I clone a chart shape from another pptx (This feature is what I really want). This issue is only for map charts. No issue with another type of chart.

Screenshot from 2023-01-26 15-55-29.png (11.9 KB)

mapChart.zip (28.1 KB)

@anantutkpd,
Please see how the slide from your mapChart.pptx document looks like in my PowerPoint: MapChart.png (90.9 KB)
Please note that you must be online to display the Map chart in PowerPoint and it takes some time to display.

I was unable to reproduce this problem with Aspose.Slides 22.12. Please share the following:

  • input and output presentation files
  • code example that reproduces the problem

It will be great if you create a new forum thread for this issue.

A post was split to a new topic: Exporting PowerPoint Presentation with Map Chart as a Thumbnail or PDF File