I am trying to display customer registration info. I am wrapping the data and passing inside the highchart, but the data what I am passing is not getting displayed. Any help/advice greatly appreciated.
Angularjs:
.controller('ctrl',['$scope','$http',function($scope,$http){
$http({
url: '//customerinformation',
method: 'GET'
})
.then(
function successCallback(response){
$scope.users = response.data.customers;
loadChartData(response.data.customers);
},
function errorCallback(response){
console.log('Error:' + response.data);
});
function loadChartData(data) {
$scope.chartOptions = {
chart: { type: 'column' },
title: { text: 'Customer Information' },
xAxis: { categories: ['Jan', 'Feb', 'Mar','Apr','May','June','July','Aug','Sep','Oct','Nov','Dec'] },
yAxis: { title: { text: 'No.of customer' } },
series: [{
name: 'customer',
data: data
}]
};
}
}])
response.data.customersdetails? Maybe format is wrong? It should be array of points, where values are numbers.