Suboptimal tooltip positioning in facets
I often have plots with many tooltips, and the current overflowing behavior makes these a bit tricky to use. Example:
from lets_plot import *
LetsPlot.setup_html()
d = {
l: [i]*3 for i, l in enumerate(string.ascii_lowercase)
} | {'facet': [0, 1, 2]}
ggplot(d, aes(x='a', y='b')) + geom_point(tooltips=layer_tooltips(list(string.ascii_lowercase))) + ggsize(300, 1000) + facet_wrap('facet')
The lower tooltips have enough space to display:
The upper ones overflow even though there is space for them:
Likely related: #1043
We attempted to prevent overlap between tooltips (e.g., the axis tooltip 0.0 forced the general tooltip to align at the top).
In the fix, I relaxed the overlapping restriction. Now, the general tooltip can overlap other tooltips (e.g., the axis tooltip becomes hidden in such cases). This leaves room for improvements, such as using a semi-transparent general tooltip or assigning a higher z-order to axis tooltips.
Output with the fix: