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] Add labels above bars example #16860

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bernardobelchior
Copy link
Member

Add labels above bars example. Related to #12975.

Comment on lines +31 to +40
export type BarLabelProps = Omit<React.SVGProps<SVGTextElement>, 'ref' | 'id' | 'style'> &
BarLabelOwnerState & {
style: Omit<React.SVGProps<SVGTextElement>['style'], 'x' | 'y' | 'height' | 'width'> &
AnimatedProps<{
x: number;
y: number;
width: number;
height: number;
}>;
};
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I need to do this so that the types are correct, but then TypeScript fails because useSlotProps expects style to be CSSProperties | undefined.

Should I move these properties from the style prop? IMO we should because they aren't spreadable to a normal HTML or SVG element.

We're still in alpha, so we could still make a breaking change, couldn't we?

What do you think, @alexfauquette @JCQuintas?

@mui-bot
Copy link

mui-bot commented Mar 7, 2025

Deploy preview: https://deploy-preview-16860--material-ui-x.netlify.app/

Updated pages:

Generated by 🚫 dangerJS against 94e6909

@bernardobelchior bernardobelchior added docs Improvements or additions to the documentation enhancement This is not a bug, nor a new feature component: charts This is the name of the generic UI component, not the React module! labels Mar 7, 2025
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! docs Improvements or additions to the documentation enhancement This is not a bug, nor a new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants