-
Notifications
You must be signed in to change notification settings - Fork 11.9k
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
Cleanup scales export for better import strategy #5953
Cleanup scales export for better import strategy #5953
Conversation
Scales now export a function responsible to register the scale class and associated defaults while the definition has been moved outside the exported function.
1d00765
to
93850b6
Compare
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.
Cant fully review on mobile, whitespace ignoring setting is not obeyed on larger diffs. Will do full review later.
src/chart.js
Outdated
@@ -17,6 +17,7 @@ Chart.Element = require('./core/core.element'); | |||
Chart.elements = require('./elements/index'); | |||
Chart.Interaction = require('./core/core.interaction'); | |||
Chart.layouts = require('./core/core.layouts'); | |||
Chart.LinearScaleBase = require('./scales/scale.linearbase'); |
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.
Can we add a comment to remove this at v3 since it should be internal only?
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.
Done
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.
Just one minor comment. Looks good
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.
Had to look hard, but found eventually a line to comment on 😈
Scales now export their class and associated defaults (`_defaults`), the registration being done globally in `src/chart.js`.
Scales now export a function responsible to register the scale class and associated defaults while the definition has been moved outside the exported function.
Relates #4478
Closes #5941