I am generating chart using c3. I am accessing Rest API in the c3 chart to load the JSON data. I referred this example http://c3js.org/samples/data_load.html I am trying to load the chart dynamically using load function which gives me
Runtime Error this.chart.load is not a function
private chart: any;
this.chart = c3.generate({
data: {
url: '/api/systemvalues',
type: 'line'
}
});
setTimeout(function () {
this.chart.load({
url: '/api/systemvalues'
});
}, 1000);
These are the versions used:
@angular/core": "2.4.10",
"c3": "^0.4.11",
"d3": "^3.5.17",
"typescript": "2.2.2"