-
-
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 item highligh feature to plugin system #16211
Conversation
Deploy preview: https://deploy-preview-16211--material-ui-x.netlify.app/ Updated pages: |
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.
Small comments, feature seems to be working
...ges/x-charts/src/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.ts
Show resolved
Hide resolved
@JCQuintas I've exported the lower level hook and added instruction in the migration guide, because some users rely on the removed hook to highlight some item in their tooltip |
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.
small suggestion
Co-authored-by: Jose C Quintas Jr <[email protected]> Signed-off-by: Alexandre Fauquette <[email protected]>
CodSpeed Performance ReportMerging #16211 will degrade performances by 73.35%Comparing Summary
Benchmarks breakdown
|
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
ec8a9fc
to
8d4c6be
Compare
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
The HEAD is not relevant because the script did not run on master since the update. But we can have an idea by looking at the HEAD results on #16374 The Line and Bar chart (pro and MIT) take 30ms more. I trie to compare the render of this branch and the master on my device, but I get the opposite. The new version takes less time to render |
The PR is divided in commits to avoid having to go through all the definition updates.
There is nearly no breaking change in this PR, except for the hook to get directly access to the context, which got removed. (because the context does not exist anymore).
The only feature they could miss from this hook is the one in
useHighlightStateGetter
which returns{ isHighlighted: (item) => boolean, isFaded: (item) => boolean}
. which is more flexible than theuseItemHighlighted
returning{ isHighlighted: boolean, isFaded: boolean}
Changelog
Breaking changes
The
useHighlighted
hook got removed.This hook provided direct access to the internals of the highlight management. We now recommend using the control API, and the
useItemHighlighted
/useItemHighlightedGetter
.More details in the migration guide
If your use-case requires more advanced options, please open an issue.