I want to employ JavaFx facilities to generate charts which will be included in a report generation module
I've read some code snippets that use the snapshot LineChart's method
// lineChart previously properly. It actually renders in a Window (on
// another JavaFX application). But this test case doesn't display it.
WritableImage wi = lineChart.snapshot(new SnapshotParameters(), new WritableImage(250, 250));
File file = new File("CanvasImage.png");
try {
ImageIO.write(SwingFXUtils.fromFXImage(wi, null), "png", file);
} catch (Exception s) {
}
But when I display the image it shows nothing, only a little coordinate axis at 0,0 position.