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

remove unnecessary extra init steps #3818

Merged
merged 1 commit into from
Jan 22, 2017
Merged

remove unnecessary extra init steps #3818

merged 1 commit into from
Jan 22, 2017

Conversation

etimberg
Copy link
Member

With the changes to update to update configs, these steps are no longer needed as part of the chart initialization since update will take care of it. We still need to build scales though, since they are needed in afterInit and update currently cannot update axes.

@@ -124,10 +124,7 @@ module.exports = function(Chart) {
// Make sure controllers are built first so that each dataset is bound to an axis before the scales
Copy link
Member

Choose a reason for hiding this comment

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

We might want to cleanup that comment as well ;)

me.buildScales();
me.updateLayout();
Copy link
Member

@simonbrunel simonbrunel Jan 22, 2017

Choose a reason for hiding this comment

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

The updateLayout() definition method should also be removed, seems only called from that line.

@etimberg
Copy link
Member Author

@simonbrunel updated per your comments

Copy link
Member

@simonbrunel simonbrunel left a comment

Choose a reason for hiding this comment

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

fingers crossed!

@etimberg etimberg merged commit 1934358 into master Jan 22, 2017
@etimberg etimberg deleted the improve-init branch January 22, 2017 20:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants