Export of charts to PDF or SVG working. Export of a zoomed chart results in SVG-File with chart without zoom. Is there a way to generate a SVG image of the chart with the selected zoom?
Asked
Active
Viewed 169 times
0
-
The method I use to generate the SVG file is: SVGGenerator.getInstance().generate(chartWindow.getChart().getConfiguration(), width, height); – Luca Magnotta Mar 06 '18 at 16:13
1 Answers
1
You should be able to export the zoomed chart by setting the extremes of the axes. I think axis extremes are not synchronized, but you can get the values from a ChartSelectionEvent for instance.

Guille
- 449
- 3
- 6
-
One more question: It seems that ChartSelectionEvent listener overrides the default behaviuor of the chart (zoomin-zoomout animantion and "reset zoom" button visualization): there is a way to avoid this? – Luca Magnotta Mar 09 '18 at 11:07
-
Unfortunately I don't think there is a way to not prevent default at the moment, you can emulate the zoom by setting the axis extremes, and with a Vaadin Button that calls `Configuration#resetZoom()` – Guille Mar 09 '18 at 12:02
-
If you think it would be useful to have support for an event with new selection that doesn't prevent the zooming you can create an issue in https://github.com/vaadin/charts/issues/new – Guille Mar 09 '18 at 12:06