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] Listener for X axis value in tooltip #14689

Closed
ceyxasm opened this issue Sep 20, 2024 · 4 comments
Closed

[charts] Listener for X axis value in tooltip #14689

ceyxasm opened this issue Sep 20, 2024 · 4 comments
Labels
component: charts This is the name of the generic UI component, not the React module! customization: logic Logic customizability

Comments

@ceyxasm
Copy link

ceyxasm commented Sep 20, 2024

Steps to reproduce

Not exactly a new bug; but I want to be be able to update the value of a variable depending upon the value showed on a tool tip; for custom rendering of more info ( the info that needs to be rendered is not related to MUI-X

image
For example here, hovering shows a tooltip with coordinates (5, 8.5) and I want to be able to update an internal state variable with these values.
And I am not sure how exactly to do this.

If I have the time-stamp of the point being explored, I can generate and show more information about the time-stamp (ex: events that happened at that time) which could explain the corresponding value in Y-axis

Current behavior

No response

Expected behavior

No response

Context

No response

Your environment

No response

Search keywords: interactive display,

@ceyxasm ceyxasm added bug 🐛 Something doesn't work status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Sep 20, 2024
@michelengelen michelengelen changed the title Listener for X axis value in tooltip [charts] Listener for X axis value in tooltip Sep 20, 2024
@michelengelen michelengelen added customization: logic Logic customizability component: charts This is the name of the generic UI component, not the React module! and removed bug 🐛 Something doesn't work labels Sep 20, 2024
@michelengelen
Copy link
Member

@JCQuintas could you help out here please?

@alexfauquette
Copy link
Member

This will probably be related #13852 For now, the issue is that you only have access to the context from inside the SVG. To see how, have a look a the newly released tooltip demo

https://mui.com/x/react-charts/tooltip/#overriding-content-2

@ceyxasm
Copy link
Author

ceyxasm commented Sep 26, 2024

Thanks.
This issue got solved using onAxisClick handler. Got all what I needed from it.
Closing.

@ceyxasm ceyxasm closed this as completed Sep 26, 2024
Copy link

This issue has been closed. If you have a similar problem but not exactly the same, please open a new issue.
Now, if you have additional information related to this issue or things that could help future readers, feel free to leave a comment.

Note

We value your feedback @ceyxasm! How was your experience with our support team?
We'd love to hear your thoughts in this brief Support Satisfaction survey. Your insights help us improve!

@github-actions github-actions bot removed the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Sep 26, 2024
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! customization: logic Logic customizability
Projects
None yet
Development

No branches or pull requests

3 participants