0

In my code

WritableImage image = chart.snapshot(new SnapshotParameters(), null); 

goes and prints the chart result on the screen. I need to add additional info, like a comment which will have the time in a corner for example.

Is there a way to achieve this other than chart.setTitle?

Jeredriq Demas
  • 616
  • 1
  • 9
  • 36
  • Does it has to be after you take the snapshot? I mean you could add all the additional using nodes (ex: Label, Text etc.) using an AnchorPane or any layout and then take the snapshot. – JKostikiadis Sep 24 '18 at 14:02
  • Otherwise have a look in this post : https://stackoverflow.com/questions/16209512/is-there-any-javafx-image-editor – JKostikiadis Sep 24 '18 at 14:03
  • @JKostikiadis well, the first thing makes more sense, how can I do that? – Jeredriq Demas Sep 25 '18 at 05:23
  • @JKostikiadis to a chart ofc. – Jeredriq Demas Sep 25 '18 at 05:46
  • I will assume you already know how to create the chart, now you only need is to place it inside an `AnchorPane` (or even a `StackPane`) and then add all the other labels using controls `Label`. After that take the same snapshot but instead of calling `chart.snapshot...` you will call `layout.snapshot..`. Try it out if you have problems post an MCVE and i will try to help you in details. – JKostikiadis Sep 25 '18 at 11:24

0 Answers0