Exporting contains enrichments to conveniently export charts to
disk.
chart.saveAsPNG("/tmp/chart.png")
Supported Formats
Charts may be exported into the following formats:
JPEG
PNG
PDF, needs the optional dependency "com.itextpdf" % "itextpdf" on your class path
SVG, needs the optional dependency "org.jfree" % "jfreesvg" on your class path
Export Stages
There are different stages in which charts may be exported: encoding, writing and the actual
saving of the file, which is demonstrated by the following code snippet:
val bytes = chart.encodeAsPNG()
chart.writeAsPNG(System.out)
chart.saveAsPNG("/tmp/chart.png")
Exporting contains enrichments to conveniently export charts to disk.
chart.saveAsPNG("/tmp/chart.png")
Supported Formats
Charts may be exported into the following formats:
"com.itextpdf" % "itextpdf"
on your class path"org.jfree" % "jfreesvg"
on your class pathExport Stages
There are different stages in which charts may be exported: encoding, writing and the actual saving of the file, which is demonstrated by the following code snippet: