Export of charts to PDF or SVG working. Export of a zoomed chart results in SVG-File with chart without zoom. The SVGGenerator uses chart configuration (chartWindow.getChart().getConfiguration()) to create SVG-File. Is there a way to get the configuration with current zoom?
public StreamSource createSVGStreamSource() {
return new StreamSource() {
@Override
public InputStream getStream() {
int width = UI.getCurrent().getPage().getBrowserWindowWidth();
int height = UI.getCurrent().getPage().getBrowserWindowHeight();
String svg = SVGGenerator.getInstance().generate(chartWindow.getChart().getConfiguration(), width, height);
if (svg != null) {
return new ByteArrayInputStream(svg.getBytes());
}
return null;
}
};
}