3👍
✅
It seems that you’re still using Chart.js version 2
. The current latest version is 3.5.1
.
Change type: 'bar'
into type: 'horizontalBar'
and it should work.
new Chart(this.ctx1, {
type: 'horizontalBar',
...
For further details, please consult Horizontal Bar Chart from the
Chart.js v2.9.4
documentation.
0👍
Source:stackexchange.com