-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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] Is it possible to have a customised highlighted MarkElement for LineChart? #11326
Comments
@alexfauquette Please correct me if I am wrong. It is possible to inject a custom I tested this and it is possible to do that, but it is pretty hard to hit the path with that click. @alexfauquette Maybe we can improve on this one and provide a bigger invisible click-area and allow for an onClick handler to be passed as props? |
For the line mark, it's a bit special. You have a The reason behind this choice is to allow rendering a line, and a mark highlight without having to render all marks. I assume the
What make you think it needs to be a For the You get the x/y coordinate in props, and then can put whatever SVG element thanks to the CSS |
I thought it had to be a mui-x/packages/x-charts/src/LineChart/MarkElement.tsx Lines 91 to 102 in 029d4c1
But when it can be any valid |
Thank you for your replies @michelengelen and @alexfauquette |
The problem in depth 🔍
The goal is to have the highlighted mark visually different as well as the ability for an onClick event. e.g:
Your environment 🌎
No response
Search keywords: MarkElement, LineChart
Order ID: 79128
The text was updated successfully, but these errors were encountered: