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

afterUpdate missing args parameter/too many args passed to layout.prepare() #266

Closed
mloit opened this issue Jul 29, 2021 · 1 comment · Fixed by #268
Closed

afterUpdate missing args parameter/too many args passed to layout.prepare() #266

mloit opened this issue Jul 29, 2021 · 1 comment · Fixed by #268
Labels
Milestone

Comments

@mloit
Copy link

mloit commented Jul 29, 2021

While poking around to familiarize myself with the code, I spotted the code below in plugin.js

  afterUpdate: function(chart, options) {
    chart[EXPANDO_KEY]._labels = layout.prepare(
      chart[EXPANDO_KEY]._datasets,
      options);
  },

Based on the plugin API documentation, options should be the 3rd parameter, following the 'args' parameter. Luckily this seems to be harmless as layout.prepare() is only expecting the datasets parameter, so the erroneous one is ignored. 'options' should be removed entirely from the code here.

@simonbrunel
Copy link
Member

Thanks @mloit for reporting this issue. @LeeLenaleee fixed it in #268, which is merged in master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants