Kotlin / kandy

Kotlin plotting library.
https://kotlin.github.io/kandy/
Apache License 2.0
603 stars 16 forks source link

[BUG] tooltips not working #438

Closed khm0651 closed 1 month ago

khm0651 commented 1 month ago

Describe the bug

I have been following the tooltip guidelines. However, even though I followed the tooltip guidelines, the tooltip is not working, so I am reaching out for assistance.

link -> https://kotlin.github.io/kandy/tooltips-guide.html#tooltip-variables-parameter-optional

To Reproduce

image image image

Expected behavior

tooltip work

Actual Behavior

tooltip not work

Library Version, Tool version, and Environment

Additional information

Provide any other useful information that may help in resolving the bug.

AndreiKingsley commented 1 month ago

Hi! Tooltips don't work when saving to BufferedImage (as well as SVG, PNG, etc); they are only there when used in HTML/JS, and when rendering in Swing and Compose. However, the latter two are not supported natively yet, but it can be done using lets-plot renderes, see example projects: Swing: https://github.com/AndreiKingsley/kandy-swing-app-example Compose(Android): https://github.com/AndreiKingsley/kandy_android_skiko

khm0651 commented 1 month ago

It's such an obvious thought, but why did I forget that I used the BufferedImage function and converted it to an image? Thank you for the great example and answer