8000 Tooltip: xychart tooltip content appears beyond bounds. · Issue #1902 · airbnb/visx · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Tooltip: xychart tooltip content appears beyond bounds. #1902
Open
@Artttdez

Description

@Artttdez

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?

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0