I am displaying a series of charts in an Angular application. I need to update the data source for each chart and redraw it. My dataSource is updated using an Angular service which returns a promise. I can get the data to update but can not seem to get the graphs to redraw once this is complete. Can you provide some help? Below is the datasource information for my chart.
chartDataEl.dataSource =
new
kendo.data.DataSource({
transport: {
type:
'json'
,
read:
function
(options) {
//console.log('barchart read called');
var
request = vm.shipmentManagementRequest;
request.RequestType = myChart.chartData.htmlID;
shipmentService.getBasicChartData(request)
.then(
function
(result) {
options.success(result.data);
}).
catch
(
function
(error) {
options.error(error);
});
}
},
sort: {
field:
"date"
,
dir:
"asc"
},
schema: {
model: {
fields: {
date: {
type:
"date"
}
}
}
}
});