I'm having an issue with defining chart types using Dataviz.
I have an Angular application and I'm sure it might be a dependency of some kind I'm missing or something obvious. However, when I run the following I get a "Count" style display correctly:
Keen.ready(function(){
var chart = new Keen.Dataviz()
.el(document.getElementById("chart-wrapper"))
.height(500)
.prepare();
var req = client.run(query, function(err, res){
if (err) {
chart.error(err.message);
}
else {
chart
.data(res)
.title('New Customers per Week')
.render();
}
});
});
The above displays as:
However, when I add:
.type('barchart')
As:
var chart = new Keen.Dataviz()
.el(document.getElementById("chart-wrapper"))
.height(500)
.type('barchart')
.prepare();
It throws an error:
TypeError: (intermediate value).el(...).height(...).type is not a function
Am I missing something obvious?