Description
Synopsis
The hover tooltips in x-unified mode exceed max-width and therefore overflow. This happens when:
- the chart is small and close to the sides
- the chart is large (near width size) on a small screen - e.g. mobile
- the tooltip is displayed for a point on the chart that falls near the mid-point of the x-axis
The issue persists in Plotly v2.0.0.
Example
You can see an example of the issue on our live service, provided that your browser width is smaller than ~580px.
Expected behaviour
The hover tooltip x-extrema must always fall between x-extrema of the browser. An even better outcome would be for the tooltip to not spill out of the cartesian axes.
I don't think there's an easy / immediate solution to this, primarily because the tooltip position moves based on cursor position. I suppose one way to address it is to do what folks at Google Charts have done - i.e. move the tooltip until it hits one side, then stop moving horizontally.
Here's an example, which you've probably seen before:
Thanks again for all your efforts.