javachartsjzy3d

How to save jzy3d chart to file


ChartLauncher.openChart(chart)

Doesn't work for me*, so I'd like something like ChartSaver.saveChart(chart, path) if such a thing exists.

*I get:

libEGL warning: failed to create a pipe screen for i965

Solution

  • Your chart object must have a method called screenshot which accepts a File to export the chart as image.

    File image = new File("image.png");
    chart.screenshot(image);