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

Deprecation warnings on all horizontal bar charts with Chart.js 2.9.0 #6602

Closed
ankane opened this issue Oct 26, 2019 · 6 comments · Fixed by #6603
Closed

Deprecation warnings on all horizontal bar charts with Chart.js 2.9.0 #6602

ankane opened this issue Oct 26, 2019 · 6 comments · Fixed by #6603

Comments

@ankane
Copy link
Contributor

ankane commented Oct 26, 2019

Expected Behavior

No deprecation warnings when not using deprecated options.

Current Behavior

Two deprecation warnings for all horizontal bar charts

bar chart: "scales.[x/y]Axes.barPercentage" is deprecated. Please use "dataset.barPercentage" instead

and

bar chart: "scales.[x/y]Axes.categoryPercentage" is deprecated. Please use "dataset.categoryPercentage" instead

Steps to Reproduce (for bugs)

Change type to horizontalBar in the default codepen: https://codepen.io/ankane/pen/XWWgKZy

Environment

  • Chart.js version: Chart.js 2.9.0
  • Browser name and version: Chrome 78
@benmccann
Copy link
Contributor

Thanks. I've sent a PR to fix this. You can work around it by changing the default settings as I did in that PR

@ankane
Copy link
Contributor Author

ankane commented Oct 26, 2019

That was fast, thanks @benmccann!

@etimberg
Copy link
Member

Chart.js v2.9.1 has been released with a fix for this issue

@ankane
Copy link
Contributor Author

ankane commented Oct 27, 2019

Great, thanks @etimberg

@hevans90
Copy link

Still seeing this issue on 2.9.3 for vertical bar charts using the following configuration:

    scales: {
      xAxes: [
        {
          stacked: true,
          barPercentage: 0.7,
          categoryPercentage: 0.6
        } as any
      ],
...

@diamond95
Copy link

@hevans90 this one helps me: https://stackoverflow.com/a/59732946/7189547

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

Successfully merging a pull request may close this issue.

5 participants