you are using chart.js 2, use proper chart (type) names (lower cased)
see http://www.chartjs.org/docs/
For anybody coming from Google who might have done what I did... If you are declaring the chart type directly in the HTML template I had to wrap it in double quotes.
<canvas baseChart class="chart"
[datasets]="priceDataset"
[chartType]='"line"'></canvas>
Note the "line" part. 馃榿
@nabilfreeman
The reason you need the quotes around "line" is because you are binding the attribute, which will tell Angular to expect a javascript variable or object of some sort. Without the quotes it is trying to find a variable NAMED line, not the string "line". By putting the quotes around it, you are supplying Angular with an actual javascript string.
If you are using a static value for an attribute then another option is to not bind it, but just write out the attribute and its value as standard HTML markup:
<canvas baseChart class="chart" [datasets]="priceDataset" chartType="line"></canvas>
@elbootio thank you for the explanation! this makes things very clear 馃槃
In my case I needed to update Chart.js from 2.0.2 to latest version (2.7.2). Else wasn't able to use 'horizontalBar' type.
Most helpful comment
For anybody coming from Google who might have done what I did... If you are declaring the chart type directly in the HTML template I had to wrap it in double quotes.
Note the
"line"part. 馃榿