Unable to add a Chart Placeholder to Slide Layout Using Aspose.Slides for .NET

Hi, i need to be able to set the Autoshape placeholder as Chart but it seems no option to do that. In some ticket you mentioned this approach, to create a new layout with a placeholder:

presentation2.Masters[0].LayoutSlides.Add(SlideLayoutType.Chart, "Chart"); but it throws the exception " Layout type Chart is not supported now". Also, you mentioned that the default presentation already has all placeholders, but that’s not true, if you try to create a new presentation, there are no shapes with placeholders with the type “chart”.

I can create a presentation in PowerPoint with slides and shapes, and then Aspose will recognize shapes with placeholders as Charts. But impossible to create a NEW presentation via the Aspose library, add an autoshape, and set a placeholder “chart”. Please correct me if I’m wrong

So, should we just to wait until you implement it, or it’s impossible at all?

@GeorgiyS,
Thank you for posting your requirements. I was also unable to add a Chart placeholder to a slide layout.

We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): SLIDESNET-44556

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

@GeorgiyS,
Aspose.Slides for .NET 24.7 will provide a new ILayoutPlaceholderManager interface and ILayoutSlide.PlaceholderManager property for adding new placeholders to layout slides. This release will be published in the second half of July, and you will be notified.

The following example code shows how to add new placeholder shapes to the layout slide:

using (Presentation pres = new Presentation())
{
    // Getting the Blank layout slide
    ILayoutSlide layout = pres.LayoutSlides.GetByType(SlideLayoutType.Blank);

    // Getting the placeholder manager of the layout slide
    ILayoutPlaceholderManager placeholderManager = layout.PlaceholderManager;

    // Adding different placeholders to the Blank layout slide
    placeholderManager.AddContentPlaceholder(10, 10, 300, 200);
    placeholderManager.AddVerticalTextPlaceholder(350, 10, 200, 300);
    placeholderManager.AddChartPlaceholder(10, 350, 300, 300);
    placeholderManager.AddTablePlaceholder(350, 350, 300, 200);

    // Adding the new slide with Blank layout
    ISlide newSlide = pres.Slides.AddEmptySlide(layout);

    pres.Save("placeholders.pptx", SaveFormat.Pptx);
}

The issues you found earlier (filed as SLIDESNET-44556) have been fixed in Aspose.Slides for .NET 24.7 (ZIP, MSI, NuGet, Cross-platform).
You can check all fixes on the Release Notes page.
You can also find the latest version of our library on the Product Download page.