I have tested by manual embedding the chart in the slide and the chart does not resize on activation. I am posting the code which I am using -
string slideLayoutPpt = System.IO.Path.Combine(SystemConfiguration.TemplatesFolder, Templates.SLIDE_LAYOUT);
Aspose.Slides.Presentation tempPresentation = new Aspose.Slides.Presentation(slideLayoutPpt);
Slide layoutSlide = tempPresentation.GetSlideByPosition((int)SlideLayout.TitleAndContent);
SortedList sList = new SortedList();
slide = tempPresentation.CloneSlide(layoutSlide, _presentation.Slides.LastSlidePosition + 1, _presentation, sList);
Aspose.Slides.Presentation pres = pSlide.Parent;
Workbook workbook = new Workbook();
workbook.Open(template);
//Obtaining the reference of the worksheet by name
worksheet = workbook.Worksheets[DataSheet];
worksheet.Cells.ClearRange(0, 0, 20, 20);
DataTable data = null;
data = DataSection.ChartDataTable;
worksheet.Cells.ImportDataTable(data, true, "A1");
Chart chart = workbook.Worksheets[ChartSheet].Charts[0];
//clear the chart's old values
chart.NSeries.Clear();
chart.NSeries.Add(worksheet.Name + "!B2:" + cellName, true);
chart.NSeries.CategoryData = worksheet.Name + "!A2:A" + rowcount;
string sItem = string.Empty;
for (int i = 0; i < chart.NSeries.Count; i++)
{
sItem = worksheet.Cells[0, i + 1].Value.ToString();
chart.NSeries[i].Name = sItem;
}
chartBitMap = chart.ToImage();
if (chartBitMap != null)
{
//Save it to a stream
MemoryStream wbStream = workbook.SaveToStream();
wbStream.Seek(0, SeekOrigin.Begin);
byte[] b = new byte[wbStream.Length];
wbStream.Read(b, 0, (int)wbStream.Length);
wbStream.Close();
//Add Chart to Slide
Aspose.Slides.Shape shp = pSlide.Shapes[1];
int x = shp.X;
int y = shp.Y;
int width = shp.Width;
int height = shp.Height;
pSlide.Shapes.RemoveAt(1);
OleObjectFrame oof = pSlide.Shapes.AddOleObjectFrame(x, y, width, height, "Excel.Sheet.12", b); //msOut.ToArray());
//cover the object message with the image of the chart
Aspose.Slides.Picture pic = new Aspose.Slides.Picture(pSlide.Parent, chartBitMap);
int picID = pres.Pictures.Add(pic);
oof.PictureId = picID;
pres.Write(presLocation);
The application is quite big and has code to create different types of charts. So, I have copied the base code for creating the charts. The slideLayout template and the charts template is attached.