Skip to content
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] Support multiple values for border radius on bar charts #13077

Open
joserodolfofreitas opened this issue May 10, 2024 · 1 comment
Open
Labels
component: charts This is the name of the generic UI component, not the React module! customization: css Design CSS customizability dx Related to developers' experience new feature New feature or request waiting for 👍 Waiting for upvotes

Comments

@joserodolfofreitas
Copy link
Member

joserodolfofreitas commented May 10, 2024

Summary

Currently, Bar charts support setting a uniform border radius for all corners of a bar, which applies the same curvature to the top-left, top-right, bottom-left, and bottom-right corners.
The idea is to introduce more flexibility by enabling separate radius values for each corner, thereby improving visual customization

Recharts solution is overall worst than ours, but they cover this aspect, and maybe we can follow the same behavior.

Main challenge

The point in the #12834 (comment) is that currently the border radius manages Negative & Positive values differently, eg: positive vertical values have no border radius on the bottom corners. If we allow for setting border radius for every corner, just like the border-radius css, how should we override the current behaviour?

Search keywords:
border-radius bar chart

@joserodolfofreitas joserodolfofreitas added new feature New feature or request customization: css Design CSS customizability dx Related to developers' experience component: charts This is the name of the generic UI component, not the React module! labels May 10, 2024
@paolobiavati
Copy link

I have a similar problem: if you change the background-color of the column headers, when the toolbar is visible you can see the radius affect both the main container and the column header.

Can be reproduced in https://mui.com/x/react-data-grid#premium-plan
change the background-color of the div[role='row'] inside .MuiDataGrid-columnHeaders

in this image I manually change --unstable_DataGrid-radius to 16px (instead of 4px default) to to better highlight the problem.
image

@alexfauquette alexfauquette added the waiting for 👍 Waiting for upvotes label Jun 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: charts This is the name of the generic UI component, not the React module! customization: css Design CSS customizability dx Related to developers' experience new feature New feature or request waiting for 👍 Waiting for upvotes
Projects
None yet
Development

No branches or pull requests

3 participants