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