Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[charts] Synchronizing Tooltips with Controlled Highlight #14455

Open
hsellik opened this issue Sep 2, 2024 · 2 comments
Open

[charts] Synchronizing Tooltips with Controlled Highlight #14455

hsellik opened this issue Sep 2, 2024 · 2 comments
Labels
component: charts This is the name of the generic UI component, not the React module! enhancement This is not a bug, nor a new feature new feature New feature or request waiting for 👍 Waiting for upvotes

Comments

@hsellik
Copy link

hsellik commented Sep 2, 2024

Summary

Having a controlled highlight allows you to control it in multiple charts at the same time. However, the tooltip does not appear on the controlled highlight. It only appears on the chart that is hovered.

It would be nice if we could also show the tooltip in a controlled way.

Examples

https://mui.com/x/react-charts/tooltip/

Motivation

Instead of putting several lines together on one chart. In some scenarios, it would be more intuitive to put the data on separate charts, but show the tooltip at the same location for all the charts when they are hovered.

Search keywords: chart, controlled, tooltip, synchronized, highlight

@hsellik hsellik added new feature New feature or request status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Sep 2, 2024
@michelengelen michelengelen added the component: charts This is the name of the generic UI component, not the React module! label Sep 2, 2024
@michelengelen michelengelen changed the title Synchronizing Tooltips with Controlled Highlight [charts] Synchronizing Tooltips with Controlled Highlight Sep 2, 2024
@alexfauquette alexfauquette added the enhancement This is not a bug, nor a new feature label Sep 2, 2024
@alexfauquette
Copy link
Member

Thanks for the suggestion. Do you have a concrete example?

I struggle to see a dashboard with multiple tooltip moving at the same time. IMHO this kind of feature easily ends up in a chrimast tree effect where everything moves. But that's probably because I never faced a valid use case for it.

Two points to share context:

  1. The tooltip content and highlight are ma,aged separately, because you can highlight stuff that do not have tooltip. Best example is the series (line areas) which chan be highlight but have not data to be displayed (too many points)
  2. The current direction we are thinking about is instead of adding features to the tooltip (position, controls, ...) we want to provides hooks and components to simplify their creation. Such that you could creat your own logic with ease

@alexfauquette alexfauquette added waiting for 👍 Waiting for upvotes and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Sep 2, 2024
@hsellik
Copy link
Author

hsellik commented Sep 2, 2024

Thank you for the swift reply!

We are currently developing a dashboard for a physical device which has different metrics we want to observe, such as temperature, voltage (of different comopnents) and some other.

Putting all of them on the same line chart would mean having a difficult to follow Y axis.

Instead, we would like to use several line charts with shared time points, but different Y axis values. If the customer would move on one of the line charts, we would like the x axis line highlight and tooltip to appear on all the charts for the same shared time value.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: charts This is the name of the generic UI component, not the React module! enhancement This is not a bug, nor a new feature new feature New feature or request waiting for 👍 Waiting for upvotes
Projects
None yet
Development

No branches or pull requests

3 participants