[Chartjs]-Chartkick-vue bar chart โ€“ "horizontalBar" is not a registered controller

4๐Ÿ‘

โœ…

chart.jsโ€˜s docs indicate that the horizontalBar type was removed in 3.x, but chartkick-vue still uses it.

The solution is to use the current stable release of chart.js (2.x) instead of the 3.x beta:

npm i -S chart.js@^2

demo

6๐Ÿ‘

Itโ€™s actually type: 'bar' with indexAxis: 'y' in the options now.
See https://www.chartjs.org/docs/latest/samples/bar/horizontal.html

Leave a comment