-
-
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] Add documentation on border radius alternative for BarCharts
#12859
[charts] Add documentation on border radius alternative for BarCharts
#12859
Conversation
Deploy preview: https://deploy-preview-12859--material-ui-x.netlify.app/ Updated pages: |
what if we have stacking series? how will that case be handeled? |
Right now it would apply the inset on every one of the items in the stack. So it wouldn't look very good. Is adding border radius to a stacking bar chart important to you? We thought about documenting this workaround while we gather more info on this. Can you explain why it is important? |
yes, as i was working one of my projects that required this particular design! |
It can work for stacking if you do not dynamically compute the stacking order and will be broken if the top bar has 0 height https://codesandbox.io/p/sandbox/confident-danny-c7nsz2?file=%2Fsrc%2FDemo.tsx%3A8%2C16 |
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.
Looks pretty nice
If we were able to provide isExtremum
and value
to the ownerState
we could support stacking the same way 🤔
Co-authored-by: Alexandre Fauquette <[email protected]> Signed-off-by: Jose C Quintas Jr <[email protected]>
I already have a working POC at #12834 needs cleanup and adjustments though |
…s` (mui#12859) Signed-off-by: Jose C Quintas Jr <[email protected]> Co-authored-by: Alexandre Fauquette <[email protected]>
…s` (mui#12859) Signed-off-by: Jose C Quintas Jr <[email protected]> Co-authored-by: Alexandre Fauquette <[email protected]>
As @alexfauquette suggested on the previous PR in order to provide a quick alternative to borderRadius on bar charts, we can simply use css'
clipPath
property, which should be enough for most regular cases.@alexfauquette not sure this "resolves" the issue at #12220, what do you think?
https://deploy-preview-12859--material-ui-x.netlify.app/x/react-charts/bars/#border-radius