Skip to content

Tooltip cursor line positioning in Area #5592

Description

@torztomasz

Do you want to request a feature or report a bug?

Feature request

What is the current behavior?

When using the AreaChart component, the tooltip line (rendered by Tooltip) appears either below the activeDot and chart area, obscuring it during hover if placed before the Area component, or overlapping the activeDot and chart area if placed after the Area component

Image
Image

Code

https://codesandbox.io/p/devbox/simple-line-chart-forked-87w27z?file=/src/App.tsx:86,11&workspaceId=ws_To17rLGMkDt2tp8VzZBPSC

What is the expected behavior?

There should be a way to position the tooltip line between the activeDot and the chart area.

Image

Attempted Solutions

  1. Adjusting the order of components did not resolve the issue.
  2. Using z-index on the ChartTooltip container was ineffective, as SVG does not respect it.
  3. Attempted DOM manipulation to reorder SVG elements dynamically (feels possible, but too hacky).

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementEnhancement to a current APIfeature requestIssues that are feature requests

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions