Description
To follow this code, the tooltip position is calculated based on one of four sectors relative to the cursor click/hover point (top-left, top-right, bottom-left, bottom-right).
Let's consider the following scenario: @visx/xychart is positioned in the center of the viewport with small margins around it. The tooltip, which is used to describe a point, has a long text (shorter than the width of the viewport) and is displayed when the cursor hovers over a specific point. The cursor click occurs slightly to the right of the center of @visx/xychart.
In this scenario, the tooltip's content is displayed in the top-left corner of the screen, but it extends beyond the viewport due to its width. Is it possible to adjust the positioning of the tooltip so that it "rests" on the edge of the viewport without extending beyond it?