Closed smallshen closed 10 months ago
At the moment nobody is working on this but compose frontend sounds interesting. If compose canvas is similar to jfx scene and also supports CSS than this task doesn't seem extremely difficult.
Ideally the same code would work on desktop and Android.
Jetpack Compose is powered by Skia, you can look into the jetpack compose canvas which is a drawScope under package androidx.compose.ui.graphics.drawscope.
But I think it would be better just asking people who work at Jetpack Compose Desktop in JetBrains.
Right now I export the image bytearray without write into files, changing the color to transparently and blablabla, not efficient.
Jetpack Compose support render svg files but it is buggy with the svg output by let's plot.
Moreover, Jetpack Compose' API is really lightweight and easy to use, it would be good to have full integration such animations( only one line aniamte...asState() ), clickable charts etc.
Right now I export the image bytearray without write into files, changing the color to transparently and blablabla, not efficient.
This is terrible) Do you mean you export lets-plot plot as an image? If Jetpack Compose supports android webview then it should be possible to render interactive plots using webview.
Speaking of Compose for Desktop, my understanding is that it's possible to use Swing components in Compose for Desktop app.
Of course, rendering to compose canvas would be preferable anyhow.
yes export to image, it is terrible. Jetpack compose desktop is based on skia (skiko is what they use for jvm bindings), I am not expert on that too, but I guess make fronted for skia could have more extensibility than only jetpack compose desktop.
Also I am trying to make skiko work with lwjgl( allow jetpack compose draw in lwjgl ), it could render plots directly in jvm games.
the same problem, I want to use compose to build my next application, but I can't find a good chart library suitable with compose.
lets-plot-kotlin will be awesome if armed with compose.
We are planning to attempt drawing plots on compose canvas but at the moment there is no certainty on the time frame. Meanwhile you can try lets-plot Swing component (desktop) or android Webview for rendering.
The canvas is really similar, however, compose doesn't support CSS, but the Modifier (How we modify components with compose) is really straightforward.
but the Modifier
Thanx! Will take a look.
Any updates on this? I was looking for a graph lib which works with Kotlin Compose Multiplatform, as there aren't many. I look forward for let's plot!
There actually is some progress. I hope we'll be able to release new skiko-based rendering engine along with compose lets-plot composables in a matter of few weeks. Initially only targeting Desktop and Android.
Lets-plot-kotlin supporting Compose for desktop will be released soon? I am looking forward to it and there is a need to use it.
@changhexuefei This is the plan yes.
Good news! We've just released Lets-Plot Skia Frontend targeting Compose-Multiplatform' Desktop and Android platforms. You will find minimal examples of charts at lets-plot-compose-demos GitHub repo. We tested the demos in IntelliJ IDEA only. Would appreciate any feedback on your experience with the demos in Android Studio. As well as any other feedback of course.
This is amazing!
since there are javafx frontend, are there any plan about having Jetpack Compose Frontend?