PlotArea position

Hello. I use follow code for copy plot area position:

var presentation1 = new PresentationEx(@“D:\shapes\1.pptx”);
var presentation2 = new PresentationEx();
var shape1 = (from SlideEx slide in presentation1.Slides
from ShapeEx shape in slide.Shapes
select shape).First();
ChartEx chart1 = (ChartEx)shape1;
presentation2.SlideSize.Size = presentation1.SlideSize.Size;
var chart2 = presentation2.Slides[0].Shapes.AddChart(chart1.Type, 0, 0, chart1.Width, chart1.Height);
chart2.PlotArea.Width = chart1.PlotArea.Width;
chart2.PlotArea.Height = chart1.PlotArea.Height;
chart2.PlotArea.X = chart1.PlotArea.X;
chart2.PlotArea.Y = chart1.PlotArea.Y;
//CopyProperties(chart2, chart1);
presentation2.Save(@“D:\shapes\2.pptx”, SaveFormat.Pptx);

but into result file (2.pptx) PlotArea has difference position and size.
Could you help me?

1.pptx attached.

Hi,


I have worked with the sample code and presentation attached to reproduce the issue on my end. It seems to be an issue with Aspose.Slides while getting the values of height and width from chart 1 as when I set the chart2 height to 0.75 manually, it generates the same chart plot area height as in case of chart1 plot height. I have created an issue with ID SLIDESNET-34498 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 resolved.

We are sorry for your inconvenience,

The issues you have found earlier (filed as SLIDESNET-34498) have been fixed in this update.