We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Problem in shapes of the Series line of the chart

Hi,


We are facing following issue with aspose-cells-8.5.2.4.

In PDF output of the chart, the square shapes in the series line are not the same as in the original excel file. For your reference I have also attached the PDF generated directly from MS Excel and comparison between the two.

Following is the code used to generate the output:

WorksheetCollection ws = workbook.getWorksheets();
Chart chart = ws.get(“mash flow”).getCharts().get(“Chart 1”);
ChartShape cshape = chart.getChartObject();

int sheetIndex = ws.add();

com.aspose.cells.Worksheet worksheet = ws.get(sheetIndex);

chart.calculate();

double chartWidthInInches = chart.getChartObject().getWidthInch();
double chartHeightInInches = chart.getChartObject().getHeightInch();

worksheet.getCells().setColumnWidthInch(0, chartWidthInInches);
worksheet.getCells().setRowHeightInch(0, chartHeightInInches);

//Setting the name of the newly added worksheet
String transientSheetName = “TransientWorksheet”;
worksheet.setName(transientSheetName);
//Copy the Chart to target Worksheet
worksheet.getShapes().addCopy(cshape, 0, 0, 0, 0);

//Get the new chart and set its height and width accordingly
com.aspose.cells.Chart chart1 = worksheet.getCharts().get(0);

chart1.getChartObject().setHeightInch(chartHeightInInches);
chart1.getChartObject().setWidthInch(chartWidthInInches);

//Make remaining worksheets invisible so that they are not part of the output pdf
for (int i = 0; i < ws.getCount(); i++) {
String sheetName = ws.get(i).getName();
if(!transientSheetName.equalsIgnoreCase(sheetName)){
ws.get(i).setVisible(false);
}
}
PdfSaveOptions pdfSaveOptions = new PdfSaveOptions();
pdfSaveOptions.setOnePagePerSheet(true);

worksheet.getPageSetup().setTopMargin(0);
worksheet.getPageSetup().setBottomMargin(0);
worksheet.getPageSetup().setRightMargin(0);
worksheet.getPageSetup().setLeftMargin(0);

worksheet.getPageSetup().setPrintArea(“A1:A1”);

workbook.save(“c:/temp/Aspose Generated-Chart 1.pdf”, pdfSaveOptions);
Thanks,
Neeraj

Hi,


I have evaluated your scenario/ case a bit.

Well, if you could open your template XLSM file into MS Excel 2007, you will see similar output as per Aspose.Cells’ generated chart/image in the output PDF file. We normally follow Ms Excel 2007 standards for look and feel for the chart shapes to be rendered. When I open the file into Ms Excel 2010, I got somewhat changed markers/series points in the chart as per your output PDF file generated by Ms Excel 2010/2013.

Thank you.


Hi Amjad,


Thanks for the clarification.

Since Ms Excel 2010/2013 are used nowadays - if one wants to generate output using Ms Excel 2010/2013 standards, does Aspose provide any option (may be via configuration) for that?


Thanks,
Neeraj



Hi,


Thanks for sharing your concerns.

Well, as we already observed the issue. We found that shapes of the series line/ markers in the chart are rendered according to MS Excel 2007 and not in accordance with MS Excel 2010/2013. Aspose.Cells follows similar look and feel for the chart shapes as per MS Excel 2007. Anyways, I have logged an investigation ticket with an id “CELLSJAVA-41536” for your issue/ requirements. Our product team will soon look into it if we could enhance the rendering (Chart to Image) as per MS Excel 2010/2013 look and feel.

Once we have any update on it, we will let you know here.

Thank you.

Hi,

Thanks for using Aspose.Cells for Java.

Please try the new fix for marker issues.

Please download and try this fix: Aspose.Cells for Java v8.6.1.4 and let us know your feedback.

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


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