JVM/other examples?
I have a JVM desktop app that doesn't use Swing or JavaFX. I'm also new to the concept of having to use Swing or JavaFX in a Kotlin MPP project. You write in LPK_APP.md:
[JVM/other:](https://github.com/JetBrains/lets-plot-kotlin/blob/master/LPK_APP.md#jvmother)
If your JVM app doesn't use either frontend, you can provide just "lets-plot-common" dependency:
but I can't find code examples for this use case. If there are any, can someone put a link on that page, or point me to it, so I can add something?
I really would be happy if I could avoid dealing with these frontends.
I just see that, without Swing or JavaFX, LetsPlot.getInfo() returns
Lets-Plot Kotlin API v.Unknown. Frontend: Not available.
Does that mean the suggested possibility above does not work/exist?
Hi, if there is no UI framework - just barebone JVM, then your options are limited to:
- generating static SVG image (use PlotSvgExportCommon)
- generating HTML which consists of some HTML+JS and creates an interactive chart when in a proper env (use PlotHtmlExport.kt)
There are couple of examples (not exactly like this but close) here: ExportSVG.kt, ExportHTML.kt.
However, if by "JVM desktop app" you mean a Compose Desktop app then you can try the recently released Lets-Plot for Skia Frontend.