Hello I would like to save my line chart to an image of predefined dimensions (x, y). Is there an easy way to do so? I could not find any suitable Snapshot parameter.
WritableImage image = lineChart.snapshot(new SnapshotParameters(), null);
Thanx
It's a bit late, but you should try with the scale of your line chart like this :
SnapshotParameters sp = new SnapshotParameters();
sp.setTransform(Transform.scale(5, 5));
WritableImage image = lineChart.snapshot(sp,null);
This set a scale on your linechart of 5. This may improve your image definition too.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With