-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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] Move the line item highligh into a dedicated component #10117
Conversation
Netlify deploy previewNetlify deploy preview: https://deploy-preview-10117--material-ui-x.netlify.app/ Updated pagesThese are the results for the performance tests:
|
Signed-off-by: Alexandre Fauquette <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice improvement! 👍
Leaving a few syntax suggestions as well as a suggestion for the prop name inversion. 😉
scripts/x-charts.exports.json
Outdated
{ "name": "LineHighlightElement", "kind": "Function" }, | ||
{ "name": "lineHighlightElementClasses", "kind": "Variable" }, | ||
{ "name": "LineHighlightElementClasses", "kind": "Interface" }, | ||
{ "name": "LineHighlightElementOwnerState", "kind": "Interface" }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a point in exporting the OwnerState
type in charts codebase? 🤔
I don't see it exported on pickers or data grid. 🤷
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not really, I probably added export by reflex when defining those interfaces
Co-authored-by: Lukas <[email protected]> Signed-off-by: Alexandre Fauquette <[email protected]>
Signed-off-by: Alexandre Fauquette <[email protected]>
Linked to #9228 (comment)
Since the mark element is CPU consuming (a lot of tinny items to render)
If we only want to display the highlighted ones, it's better to render only those instead of rendering them all and hiding the other with CSS.
I let it for review without updating all the demos, such that it stays as small as possible.
I'm also uncertain about naming:
showMark
,disableHighlight
, anddisableLineItemHighlight
.Maybe it would be better to replace the series property
renderHighlight
withdisableHighlight
.Todo