0๐
โ
You cannot use like that because data is an array in your chart,
You can do something like this,
$scope.newData = data.data;
$scope.newData.push($scope.number);
And assign the values in graph
Anyway what i would recommend is there are lot of chart libraries available to support angularjs such as HighCharts-ng and nvd3. Try to use one of them.
Source:stackexchange.com