0👍
✅
Welcome to StackOverflow! According to the docs it looks like the data structure for the horizontal bar chart is slightly different. You want data to look like:
data: {
"labels": ["One", "Two", "Three", "Four"],
"datasets":[{
"label": "First Dataset",
"data":[100,200,150,300],
"backgroundColor":["green","orange","lightgrey","darkgrey"]
}]
},
I’ve attached a fiddle here: https://jsfiddle.net/c2jtL7gz/6/
Source:stackexchange.com