-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
[docs] Add a demo for a custom tick label #20073
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
Conversation
|
Deploy preview: https://deploy-preview-20073--material-ui-x.netlify.app/ Updated pages: Bundle size report
|
CodSpeed Performance ReportMerging #20073 will not alter performanceComparing Summary
Footnotes |
|
@alexfauquette Do you think this demo is meaningful to be added to the docs? If Yes, is 'Custom components' the right place for it? |
|
Maybe axis customization would be better 🤔 |
|
|
||
| return ( | ||
| <g transform={`translate(${x},${y})`}> | ||
| <foreignObject x={-20} y={0} width={60} height={50}> |
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.
It's a bit weird that we're using a foreignObject to render an SVG icon, but I guess it's valid.
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.
Yeah it feels a bit useless. You could probably achieve this more efficiently with just the svg.
Maybe we could use the logo images here instead? 🤔
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.
Makes sense, I'll try that.
Co-authored-by: Bernardo Belchior <[email protected]> Signed-off-by: Prakhar Gupta <[email protected]>
Signed-off-by: Bernardo Belchior <[email protected]>

Preview: https://deploy-preview-20073--material-ui-x.netlify.app/x/react-charts/axis/#adding-svg-icons