JetBrains / lets-plot-kotlin

Grammar of Graphics for Kotlin
https://lets-plot.org/kotlin/
MIT License
419 stars 36 forks source link

How to remove side tooltips without `anchor`? #189

Closed AndreiKingsley closed 10 months ago

AndreiKingsley commented 1 year ago

Is it possible to get rid of side tooltips while keeping main tooltips the dynamic position of the main tooltips?

image
OLarionova-HORIS commented 1 year ago

Could you please show the code of the example?

In general, if we talk about side tooltips, they are not shown when transferred to a general tooltip via line():

geomLineRange(
    tooltips = layerTooltips().line("min:|^ymin").line("max:|^ymax"
) { ymin = "min"; ymax = "max" }

— we'll see a two-line tooltip and no side tooltips.

To hide tooltips from the layer, use tooltips = tooltipsNone.

AndreiKingsley commented 1 year ago

For example, I want to display layerTooltips with 1 line and remove side tooltips here:

image
AndreiKingsley commented 1 year ago

Perhaps we should separate the side and axis tooltips into a separate API? Because the side tooltips formatting in layerTooltips() is not obvious at all. And also here we could hide side tooltips.

alshan commented 10 months ago

In v4.4.2 see new option disableSplitting() in tooltip customization API: https://nbviewer.org/github/JetBrains/lets-plot-kotlin/blob/master/docs/examples/jupyter-notebooks/f-4.4.2/tooltips_disable_splitting.ipynb