Error Bars in PPT and PPT to PDF conversion issues

Hi,

We are trying to export PPT and PDF just like the PPT.
Issue 1 : Is there any way to get the error bars for the line chart of a powerpoint slides ? I didn’t find it in this short time. Please, provide me the code how to get error bars in Aspose.Slides.Pptx.Charts.ChartSeriesEx.

Issue 2 : We are doing PPT export basis on a template file. Please, see the SampleTemplate.pptx file which is our template and ChartHolder Chart is our target. In this chart, “Switch Row/Column” has been done for the selected data and we provide some sample data, for example- upto ‘Column12’.
Our concept is something like that if we provide less than these sample data eg. A1:G7 then our chart will draw with the less data eg. A1:D6 and category would not be shown on chart with E,F & G column.
We use these code to draw chart :

ShapeEx shape = GetShape(“ChartHolder”);
ChartEx chart = (ChartEx)shape;

int prevSeries = chart.ChartData.Series.Count;
int prevCat = chart.ChartData.Categories.Count;

Workbook wb = new Workbook(chart.ChartData.ReadWorkbookStream());
wb.Worksheets[0].Cells[0, 0].PutValue("");
wb.Worksheets[0].Cells[0, 1].PutValue(“Series1”);
wb.Worksheets[0].Cells[0, 2].PutValue(“Series2”);
wb.Worksheets[0].Cells[0, 3].PutValue(“Series3”);

wb.Worksheets[0].Cells[1, 0].PutValue(“Category1”);
wb.Worksheets[0].Cells[1, 1].PutValue(“2”);
wb.Worksheets[0].Cells[1, 2].PutValue(“6”);
wb.Worksheets[0].Cells[1, 3].PutValue(“0”);

wb.Worksheets[0].Cells[2, 0].PutValue(“Category2”);
wb.Worksheets[0].Cells[2, 1].PutValue(“6”);
wb.Worksheets[0].Cells[2, 2].PutValue(“2”);
wb.Worksheets[0].Cells[2, 3].PutValue(“6”);

wb.Worksheets[0].Cells[3, 0].PutValue(“Category3”);
wb.Worksheets[0].Cells[3, 1].PutValue(“6”);
wb.Worksheets[0].Cells[3, 2].PutValue(“8”);
wb.Worksheets[0].Cells[3, 3].PutValue(“3”);

wb.Worksheets[0].Cells[4, 0].PutValue(“Category4”);
wb.Worksheets[0].Cells[4, 1].PutValue(“7”);
wb.Worksheets[0].Cells[4, 2].PutValue("-8");
wb.Worksheets[0].Cells[4, 3].PutValue("-5");

wb.Worksheets[0].Cells[5, 0].PutValue(“Category5”);
wb.Worksheets[0].Cells[5, 1].PutValue(“3”);
wb.Worksheets[0].Cells[5, 2].PutValue(“4”);
wb.Worksheets[0].Cells[5, 3].PutValue(“15”);

if (prevCat >= 3)
{
for (int i = prevCat; i >= 3; i–)
wb.Worksheets[0].Cells.HideColumn(i); // Hide the extra columns
}
MemoryStream ms2 = new MemoryStream();
wb.Save(ms2, Aspose.Cells.SaveFormat.Xlsx);
ms2.Position = 0;
chart.ChartData.WriteWorkbookStream(ms2);
if ( prevSeries >= 5)
{
for (int i = prevSeries; i >= 5; i–)
chart.ChartData.Series.RemoveAt(4); //Delete the extra row
}
chart.PlotVisibleCellsOnly = true;

With these code, PPT export is just fine. Please, see attached file Saved.pptx. (We also use Marker Formatting and series Line Dash Type which you can see in the Saved.pptx).

MemoryStream fileStream = new MemoryStream()
_presentation.Save(fileStream, SaveFormat.Pdf);
byte[] bytes = fileStream.ToArray();
But, problem is whenever we save it as pdf we got the issues with
1. See Saved.pptx , there are Series1, Series2, Series3, but in PDF there is a space after Series3 in the chart.
2. Marker formatting (marker size and marker border color) isn’t applied, please see pptx and pdf files ofr Category2 (if you need code for this, please ask)
3. Series Line Dash Type isn’t applied in Category2 between Series2 and Series3, , please see pptx and pdf files ofr Category2 (if you need code for this, please ask)

Need help urgently…

Hi Mandy,

Thank you for sharing the details and template files.

The feature to add error bars is not available in Aspose.Slides for .NET at the moment. I have registered a new feature request in our issue tracking system with issue id: SLIDESNET-34900.

I tested remaining three issues as well and I am able to reproduce the issues. I have registered the following issue in our issue tracking system.

SLIDESNET-34901: Improper spacing after chart’s series3 in generated PDF file
SLIDESNET-34902: Marker Size for Category2 in generated PDF file is not as per PPTX file
SLIDESNET-34903: Series Line Dash Type is not correct between Series2 and Series3 in generated PDF.

This thread is linked to all the above issues in our issue tracking system and you will get automatic notification once the issues get resolved.

Sorry for the inconvenience,

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


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.

Hi,

Please could you update me on the current status of the requested issues

Hi Mandy,

Thank you for being patient.

I have requested the development team to share an ETA regarding your reported issues. As soon as I get any feedback, I will update you via this forum thread.

Thanks & Regards,

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


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.

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


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.