-
-
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] Export more utils #12744
[charts] Export more utils #12744
Conversation
Deploy preview: https://deploy-preview-12744--material-ui-x.netlify.app/ |
91e857a
to
7d322fd
Compare
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.
Should we document these changes?
I was thinking about adding those tools on demand, and in a few months creating a docs page about how to create your own sub-components, because documenting each hook independently does not make that much sense |
Fix #12702
I'm adding:
useSvgRef
to let user access the SVG component easily from custom sub componentsunstable_useSeries
to get access to the series after all the internal transformation. This is marked as unstable because I'm not sure the series processing will stay stable, so it might be modifiedgetPieCoordinates
to let user compute like we do the basic information about the pie rendering base on the chart state.useChartId
that get the chart id. It's a unique id generated to identify the chart when there are multiple ones in a same pageI also modify the codebase to use those hooks