Skip to content

[charts] Add support for click-triggered and controlled tooltips in charts #20187

@nizans

Description

@nizans

Search keywords

tooltip trigger persist click hover

Latest version

  • I have tested the latest version

Summary

Hi

I'm looking for a way to control the state and position of the tooltip via click instead of hover.

For example, in a PieChart, I’d like the tooltip to “freeze” when clicking on a slice — keeping its current position and content visible.

This would also enable adding interactive elements (e.g., buttons, links, or custom UI) inside the tooltip itself.

Currently, there doesn’t seem to be a way to control the tooltip’s open state programmatically or trigger it via click.

I’ve tried using the popper modifiers to capture the last popper position and save it on click, then passing that position as anchorEl.

Unfortunately, it seems that the ChartTooltipContainer overrides both the anchorEl and modifiers internally:

I’d really appreciate any guidance or suggestions on how this might be achievable with the current setup, or if there’s a recommended workaround.

Examples

Here’s a short video describing the outcome I’m aiming for:

Screen.Recording.2025-11-03.at.23.28.05.mov

Metadata

Metadata

Assignees

Labels

scope: chartsChanges related to the charts.type: enhancementIt’s an improvement, but we can’t make up our mind whether it's a bug fix or a new feature.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions