-
-
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] How do I customize edges/radius on bar charts? #12220
Comments
@mbond-SCW this is currently only possible by adding
But given the nature of these attributes you can only apply these to all corners. @alexfauquette do we plan on adding more sophisticated styling/shaping possibilities to charts? |
It's done, available in the v7: https://next.mui.com/x/react-charts/axis/#grid
Yes, ll the styles should work. It's an SVG limitation. The only way to have those rounded corner is to render a
We could create a slot component for the bars which uses a path instead of a rect to support rounded corner, but seems very edge case. For example Reachars does not propose such solution, and Nivo use the Putting that as waiting for upvote |
I can work with that, ty! |
@mAllenBond: How did we do? Your experience with our support team matters to us. If you have a moment, please share your thoughts in this short Support Satisfaction survey. |
The problem in depth
Hello!
I am trying to build out some charts with some design constraints that included rounded edges and gridlines. I'm aware that the gridlines feature is in progress, but I was wondering if I am missing something regarding applying rounded edges to a bar within a bar chart, e.g.:
I've played with a few props and style objects, but I can't seem to find any way to get the expected result. Here is a sandbox with what I would expect to input for modifying bar styles, but to summarize, given this:
I would expect either
radius
orborderRadius
to affect the edges of the bars in the chart. I noted that many other style customizations work perfectly, which made me suspicious that I'm missing something 😐Is this currently not implemented, or is there some secret sauce? Any help would be greatly appreciated!
Your environment
`npx @mui/envinfo`
Search keywords: bar charts radius rounded edges
Order ID: I'm filing this as a dev and don't have either of those things ^
The text was updated successfully, but these errors were encountered: