Hi,
I create a 3D bubble chart using the BUBBLE_3_D chart type in Aspose.Cells.
When I save as Excel workbook in code, chart shows up in Excel just fine. When I open workbook in Excel, and manually “Save as… .pdf”, chart also saves fine with 3D image. However, when I use Cells API "workbook.save(“C:\book1.pdf”, SaveFormat.PDF) ", the chart loses 3D Properties in the image.
Examples are posted without licensed version, but it behaves the same way with licensed version.
public static void convertXlsToPdf() throws Exception {
//Instantiating a Workbook object
Workbook workbook = new Workbook();
//Obtaining the reference of the first worksheet
WorksheetCollection worksheets = workbook.getWorksheets();
Worksheet sheet = worksheets.get(0);
//Adding some sample value to cells
Cells cells = sheet.getCells();
Cell cell = cells.get(“A1”);
cell.setValue(50);
cell = cells.get(“A2”);
cell. setValue (100);
cell = cells.get(“A3”);
cell.setValue(150);
cell = cells.get(“B1”);
cell.setValue(4);
cell = cells.get(“B2”);
cell.setValue(20);
cell = cells.get(“B3”);
cell.setValue(50);
ChartCollection charts = sheet.getCharts();
//Adding a chart to the worksheet
int chartIndex = charts.add(ChartType.BUBBLE_3_D,5,0,15,5);
Chart chart = charts.get(chartIndex);
//Adding NSeries (chart data source) to the chart ranging from “A1” cell to “B3”
SeriesCollection serieses = chart.getNSeries();
serieses.add(“A1:B3”, true);
chart.getNSeries().get(0).setBubbleSizes(“B1:B3”);
//Saving the Excel file
workbook.save(“C:\book1.xls”);
workbook.save(“C:\book1PDF.pdf”, SaveFormat.PDF);
}
Hi,
Thanks for your posting and using Aspose.Cells for Java.
After initial investigation, we were able to find this issue using the latest version: Aspose.Cells for Java 7.3.5 with the following code.
We have logged this issue in our database. We will look into it and fix this issue. Once the issue is fixed or we have some other update for you, we will share it with you asap.
This issue has been logged as CELLSJAVA-40410.
I have also attached the output files and screenshot for your reference.
Java
//Instantiating a Workbook object
Workbook workbook = new Workbook();
//Obtaining the reference of the first worksheet
WorksheetCollection worksheets = workbook.getWorksheets();
Worksheet sheet = worksheets.get(0);
//Adding some sample value to cells
Cells cells = sheet.getCells();
Cell cell = cells.get(“A1”);
cell.setValue(50);
cell = cells.get(“A2”);
cell. setValue (100);
cell = cells.get(“A3”);
cell.setValue(150);
cell = cells.get(“B1”);
cell.setValue(4);
cell = cells.get(“B2”);
cell.setValue(20);
cell = cells.get(“B3”);
cell.setValue(50);
ChartCollection charts = sheet.getCharts();
//Adding a chart to the worksheet
int chartIndex = charts.add(ChartType.BUBBLE_3_D,5,0,15,5);
Chart chart = charts.get(chartIndex);
//Adding NSeries (chart data source) to the chart ranging from “A1” cell to “B3”
SeriesCollection serieses = chart.getNSeries();
serieses.add(“A1:B3”, true);
chart.getNSeries().get(0).setBubbleSizes(“B1:B3”);
//Saving the Excel file
workbook.save(DIR + “book1.xls”);
workbook.save( DIR + “book1PDF.pdf”, SaveFormat.PDF);
Screenshot:
Hi,
Thanks for your posting and using Aspose.Cells for Java.
We have looked into your issue further and we are afraid the chart2image feature does not support 3D Bubble Chart.
Since it is too complex, we have no plan to provide this feature in the near future.
Well, that is unfortunate to hear. Thank you for your time.
Hi,
We are sorry for your inconvenience caused!
When we analyze the feature and have any plan/eta for it, we will let you know here.
Thank you.
@vscarpenter,
We are afraid, 3D rendering feature is still not supported. Currently, you can only implement approximate 3D effects in 2D renderings.