Quantcast
Channel: Telerik Forums RSS
Viewing all articles
Browse latest Browse all 84751

Refresh Chart on DataSource update using promise

$
0
0
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 = newkendo.data.DataSource({
    transport: {
        type: 'json',
        read: function(options) {
            //console.log('barchart read called');
            varrequest = 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"
                }
            }
        }
    }
});

Viewing all articles
Browse latest Browse all 84751

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>