Chart to Image broken when setting transparent background

Hi,


I am trying to create an .EMF image from an Excel, the graph is pretty simple and in the excel file created looks great, but when using the toImage method to create an .emf image, the background of the image is totally broken.

Please find attached an image showing the excel and the resulting image.
chart.getChartObject().setWidth(imageWidth);
chart.getChartObject().setHeight(imageHeight);
chart.getChartObject().setX(x);
chart.getChartObject().setY(y);

//Setting the title
chart.getTitle().setText(ChartName);

//Constructing the color format of the chart
ChartFrame plotArea = chart.getPlotArea();
plotArea.getArea().getFillFormat().setPattern(BackgroundType.NONE);
plotArea.getBorder().setVisible(false);
plotArea.getArea().setBackgroundColor(Color.getTransparent());

//Setting the chart area
ChartArea chartArea = chart.getChartArea();
chartArea.getBorder().setVisible(false);
chartArea.getArea().setForegroundColor(Color.getTransparent());
chartArea.getArea().setBackgroundColor(Color.getTransparent());

//Removing the legend…
chart.setRectangularCornered(false);
//chart.setWallsAndGridlines2D(false);
chart.setShowDataTable(false);
//chart.setShowLegend(false);

//Adding NSeries (chart data source) to the chart range
SeriesCollection seriescollection = chart.getNSeries();

//Setting the color of the chart lines
seriescollection.add(“A1:A” + dataLenght, true);
seriescollection.get(0).getBorder().setColor(Color.fromArgb(149, 100, 100));//Red
seriescollection.get(0).getLine().setWeight(WeightType.MEDIUM_LINE);

Thanks

Hi,


Thanks for the screen shot.

Please try our latest version: Aspose.Cells for Java :

If you still find the issue, please provide us your saved Excel file here, we will test your issue by simply converting the chart in the Excel file to image file. If we found the issue, we will add a ticket for the issue into our database, so that your issue could be fixed soon.

Thank you.

Hi,


Is the image options property setQuality fixed in this version? when converting chart to an image this property doesn’t seem to make a difference no matter what value it has assigned.

Please could you advice on that?

Hi,


Well, I am not sure about the setQuality issue you are talking about. The quality should be fine if you use some vector image file format. We request you to either start a new thread for the issue with all the details and sample code snippet and files or provide more details with sample files, sample code etc. here, we will look into your issue soon.

Thank you.

you don’t know about the issue?


I already started a new thread…


https://forum.aspose.com/t/125683

Hi,


So, you are talking about the issue: “CELLSJAVA-40495”, well, I am afraid, this issue is not fixed yet.

Please follow up your other thread for the latest updates or status.

Thank you.