Important Notice - Forums is archived

To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Product icon

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.

Vaadin Charts - can't conver chart SVG to PNG

Moriya Katvan
6 years ago Jan 03, 2017 1:26pm


We want to create chart on our and save it as PNG file. we generate the chart on Java server side.
According to your documentation(https://vaadin.com/docs/-/part/charts/java-api/charts-advanced.html), there is no such option, but there is an option to convert the chart to SVG file and then use another SVG tool for our propose.
We use your SVGGenerator to get SVG string of the chart, and we try to convert it to PNG file using the Batik tool (one of the tools you mention in your documentation.).
The conversion is finished with no error, but we get an empty PNG file.
When we try to convert another SVG using the Batik tool it works fine. When we open the chart SVG in a browser it works fine.
Can you please assist?

attached is the generad SVG chart, and the PNG we get when we try to convert the SVG.

Olli Tietäväinen
6 years ago Jan 04, 2017 1:41pm
Stephan Grenier
5 years ago Jul 24, 2017 2:59am
Guillermo Alvarez
5 years ago Jul 28, 2017 11:10am