1👍
✅
What is in barChartData?
It should look something like this (from the documentation):
var data = {
labels: ["January", "February", "March", "April", "May", "June", "July"],
datasets: [
{
label: "My Second dataset",
backgroundColor: "rgba(220,220,220,0.2)",
borderColor: "rgba(220,220,220,1)",
borderWidth: 1,
hoverBackgroundColor: "rgba(220,220,220,0.2)",
hoverBorderColor: "rgba(220,220,220,1)",
data: [28, 48, 40, 19, 86, 27, 90]
},
// Additional data sets go here.
],
};
http://nnnick.github.io/Chart.js/docs-v2/#bar-chart-example-usage
Edit –
Change
type: 'Bar',
to
type: 'bar',
Edit #2 –
You can confirm your using the correct version of Chart.JS by pulling 2.0 beta 2 from here:
https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.0.0-beta2/Chart.min.js
Source:stackexchange.com