question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

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

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

10reactions
hevans90commented, Apr 21, 2020

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
      ],
...
0reactions
diamond95commented, May 8, 2020
Read more comments on GitHub >

github_iconTop Results From Across the Web

Bar Chart | Chart.js
Bar Chart. A bar chart provides a way of showing data values represented as vertical bars. It is sometimes used to show trend...
Read more >
Chartjs defaults deprecation warning - Stack Overflow
I am setting the following default in Chartjs (v2.9.3) to alter the default look of my bar charts: Chart.defaults.bar.scales.xAxes[0].
Read more >
[Solved]-Show data dynamically in line chart - ChartJS-Chart.js
I understand you want to update view with new fresh json data every xx ms ... You can use Chart.js's addData() function with...
Read more >
react-chartjs-2 - npm
We recommend using chart.js@^4.0.0 . Then, import and use individual components: import { Doughnut } ...
Read more >
Bug #1976449 “Chart.js error - bar graph not displaying”
View the reports page: Admin menu>Reports Expected results: - A horizontal bar graph under the heading 'Most frequently used blocks in ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found