Open bric3 opened 6 months ago
Hello! At the moment we don't have direct support for Swing. However, you can use Kandy plot in Swing in two ways 1) Simple but less efficient - you can create a BufferedImage (using this function) and add it to Swing. But image is raster and there's no interactions with plot (i.e. tooltips) 2) Convert Kandy Plot to Lets-Plot Plot and then use it in Swing, see https://github.com/JetBrains/lets-plot-kotlin/blob/master/USAGE_BATIK_JFX_JS.md.
OK I'll give it a try. Thanks for the feedback.
I remember mentions of tooltips (and maybe some sort interactivity with the graph), do you know if let's plot support that ?
You mean in Swing? Yes!
Created a small example with Swing based on Lets-plot Swing example https://github.com/AndreiKingsley/kandy-swing-app-example
@AndreiKingsley Thank you, it is very interesting. This should definitely be in the examples !
I'll need to check what can be accessed from a mouse event, i.e. if a data point like the hovered bar or the (x;y) can be accessed.
In the annoucement https://blog.jetbrains.com/kotlin/2023/12/kandy-the-new-kotlin-plotting-library-by-jetbrains/ there is written
I understand this is limited to the proprietary kotlin notebook plugin, but is it possible to have an example with a simple Swing application.