Clear chart and set only title


As per my requirement i need to clear out everything in the chart and just set a chart title.

I am clearing all the series, categories and chartdata workbook and then setting the chart title but it generates an empty shape without any chart title.

Please find attached the source and output file and also
Below is my code
using (Presentation sourcePresentation = new Presentation(dataDir + “Aspos_Source_Issue_ClearData.pptx”))
var sourceSlides = sourcePresentation.Slides;

            var generatedPres = new Presentation();
            generatedPres.ViewProperties.SlideViewProperties.Scale = sourcePresentation.ViewProperties.SlideViewProperties.Scale;

            var mainPage = generatedPres.Slides.InsertClone(0, sourceSlides[0]);

            var chart = (Chart) mainPage.Shapes[0];
            if (chart.ChartTitle.TextFrameForOverriding != null)
                chart.ChartTitle.TextFrameForOverriding.Text = "No Data available";
                chart.ChartTitle.AddTextFrameForOverriding("No Data available");
                chart.ChartTitle.TextFrameForOverriding.TextFrameFormat.CenterText = NullableBool.True;
                chart.ChartTitle.Height = 20;
                chart.HasTitle = true;

            // Save presentation    
            generatedPres.Save(dataDir + "Aspose_Output_Issue_ClearData.pptx", SaveFormat.Pptx);
            Console.WriteLine("Presentation Created");
        } (87.9 KB)



I have observed the issue shared by you and have been able to reproduce the issue specified. An issue with ID SLIDESNET-39684 has been created in our issue tracking system to further investigate and resolve the issue. This thread has been linked with the issue so that you may be automatically notified once the issue will be fixed.



Any update on this, or can you suggest a workaround so that all the chart data clears out and only tiltle is displayed?



I have observed your comments. Our product team is looking into this to provide you some workaround or to resolve this issue as soon as possible. I request for your patience until further feedback is shared by product team.



Can you please share Power Point presentation with desired result so that we may investigate further to help you out.



Can you please share if you have still issue or can we close this ticket if your issue has been resolved.