Bubble chart- not getting complete chart in image

I am using Aspose.Cells to create a bubble chart and save it to an image.

However, chart is getting generated in excel correctly but while generating image, it is getting cut from top and right side.


Please see the attached image and excel.

Also below is the code snippet (not complete code) where i am setting chart properties and saving to image file.


int chartIndex = sheet.getCharts().add(ChartType.BUBBLE, 2, 2, 30, 20);

Chart chart = sheet.getCharts().get(chartIndex);

chart.getChartObject().setHeight(graph.getHeight());

chart.getChartObject().setWidth(graph.getWidth());

chart.getPlotArea().getArea().setForegroundColor(Color.getWhite());

chart.getPlotArea().getBorder().setVisible(true);

chart.getChartArea().getBorder().setVisible(false);

chart.getTitle().getFont().setBold(true);

chart.getTitle().getFont().setSize(10);

chart.setShowLegend(false);


ImageOrPrintOptions imgOpts = new ImageOrPrintOptions();

imgOpts.setImageFormat(ImageFormat.getGif());

FileOutputStream fout = new FileOutputStream(thechart);

chart.toImage(fout, imgOpts);

Hi,


Thanks for the template file and sample code.

After an initial test, I observed the issue as you mentioned. I found the chart’s image is getting cut from top and right sides. I have used the following sample code with your template file, I produced the same output image per your attached screen shot:
e.g
Sample code:

Workbook workbook = new Workbook(“compChart11_1.xls”);
Worksheet worksheet = workbook.getWorksheets().get(0);

Chart chart = worksheet.getCharts().get(0);

ImageOrPrintOptions imgOpts = new ImageOrPrintOptions();
imgOpts.setImageFormat(ImageFormat.getGif());

chart.toImage(“f:\files\outcompchart11_1.gif”, imgOpts);

I have logged a ticket with an id “CELLSJAVA-41520” for your issue. We will look into it soon.

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

Thank you.

Hi again,


This is to update you that we have fixed the problem logged earlier as CELLSJAVA-41520. We will shortly provide the fix here after ensuring the quality and incorporating other enhancements. As soon as the next build of Aspose.Cells for Java is available for your testing, we will notify you here in reference to aforementioned ticket.

Hi,

Thanks for using Aspose.Cells for Java.

Please try the new fix for bubble extending out of plot area

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

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


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