Hi I don't know if I'm missing something totally o...
# datascience
r
Hi I don't know if I'm missing something totally obvious but I'm trying to use Kandy per the given example, but I keep getting
java.lang.NoClassDefFoundError: org/jetbrains/letsPlot/intern/Layer
when trying to write to a file or convert to BufferedImage
For context hoping to use this outside of any Notebook, just embedded in a small app to render for a website or a pi oled display. Am I missing a kernel or something along those lines? Finding the lets-plot docs a little hard to follow
Untitled
image.png
j
How far did you get with this? https://kotlin.github.io/kandy/kandy-with-gradle.html#getting-started-with-kandy-on-gradle If you want to display output to a website (so JS), there are more examples and guides for lets-plot here https://github.com/JetBrains/lets-plot-kotlin/blob/master/USAGE_BATIK_JFX_JS.md
r
Hey thanks, I managed to get it working after switching to "jvm" instead of "multiplatform", I never figured out the root cause. My usecase is a bit niche in that I am primarily targeting very small screens, too small for the layout manager clearly so I did some rendering by hand for that 🙂 I will also be adding a webserver to view the same plots from a browser so will return to it for that but I was a little surprised at the dependency list of kandy-lets-plot via dataframe - it pulls in apache poi & openapi (including all the swagger libraries, jackson, commons io and a yaml parser) - I'm hoping I can exclude them without issues but it sort of feels like these should be optional extras to be used as a library. I assume this is because by heritage it is to be used in Notebooks.
j
as for dataframe, yes they are safe to exclude. As described here https://kotlin.github.io/dataframe/gettingstartedgradleadvanced.html#custom-configuration, df consists of multiple modules besides dataframe-core that are optional, but included by default to make the getting started and working in notebooks easier 🙂
r
ah thanks 🙂