i’m using Plot to shows some numbers distribution, using Tooltip together with colors legend,
plot Tooltip problems / Team Matters | Observable2024-01-01T16:00:00ZPreformatted text
when the tooltip is showing below it’s looking good
but when sometimes the tooltip is showing above it’s covered,
the temporary workaround is to specify a { height: 300 }, make sure enough height for the tooltip, but want the Tooltip fixed to show above colors legend, or is there an option to make sure Tooltip always shown below the graph?
I guess the tooltip appears as a g element of the SVG image produced by Plot. Thus, you can’t see any portion of the tip that extends outside the space allotted for the SVG.
One solution is to specify enough of a margin so that you can see the tip. It seems to work fine, if you set the margin option margin: 40:
Alternatively, you might modify the CSS style by setting
@mcmcclur does the documentation need an update? What I’m seeing is “consider setting the plot’s style to overflow: visible; to prevent the tip from being truncated”—which seems correct.