Jonathan Sylvester
Jonathan Sylvester

Reputation: 1329

Downloaded Vaadin14 charts are at much much lower resolution than the charts that appear on user's screens

In Vaadin 14.4.2, I have a chart with the "chart menu" button on the right which allows users to download a chart into various formats (eg png, jpeg etc.). However, when I download the chart as a png, it gets "squished" badly. It does not look like the chart that appears on my user's screen. I would have thought that the resolution would have been at least as good as what a user sees on their own screen. Why does the Vaadin charts convert the resolution? Put another way, is there an easy way to just get the "download to png" to appear the same as what the users sees on his screen? (Worse case, I will just disable the "download to file" chart feature, since most users may know how to just take a screenshot of their screen, but I had hoped that the download feature would work since it would produce "perfect" quality charts etc.) Below is a screenshot of what my chart looks like, followed by what the downloaded png looks like.

enter image description here

And now here's the png: you can clearly see it doesn't look like the chart in the above screenshot. It's at a much much lower resolution for some reason.

enter image description here

Upvotes: 1

Views: 48

Answers (1)

Mikael Grankvist
Mikael Grankvist

Reputation: 521

Without seeing the code I would guess that the difference is in the witdh used.

If you haven't defined the Exporting.setPrintMaxWidth() to be as wide as the used width for the exported chart will be made to fit into typical paper format which is by default 780.

Upvotes: 1

Related Questions