-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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] Make error message more explicit #11457
Conversation
Deploy preview: https://deploy-preview-11457--material-ui-x.netlify.app/ |
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.
Very nice DX improvement! 👍
@@ -97,22 +98,42 @@ const useCompletedData = (): CompletedBarData[] => { | |||
if (verticalLayout) { | |||
if (!isBandScaleConfig(xAxisConfig)) { | |||
throw new Error( | |||
`Axis with id "${xAxisKey}" shoud be of type "band" to display the bar series of id "${seriesId}"`, | |||
`MUI-Charts: ${ |
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.
Nitpick: Have you considered going with a MUI-X-Charts
prefix instead to be more explicit/correct? 🤔
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.
No, but it's a good idea :)
This improvement the charts error message in 3 ways (one per commit):
MUI-Charts:
to distinguish error messages that are charts from those coming from other MUI dependencies.Axis of id "DEFAULT_X_AXIS_KEY" should be ...
which makes no sense for a new user.