Looking to create an x-y plot using AngularJS with a JSON data feed. The JSON data displays EQ magnitude VS time. How do I convert this data into an array format and plot it in a c3 chart? (similar to the one in this link )
Appreciate any assistance you can provide.
var array1 = [];
var app = angular.module('myApp',[]);
app.controller('eqfeed',function($scope,$http){
$http.get("https://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/4.5_day.geojson").then(function(response) {
$scope.eq=response.data.features;
});
});
<!DOCTYPE html>
<html>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"></script>
<body>
<div ng-app="myApp" ng-controller="eqfeed">
<table>
<tr ng-repeat="x in eq">
<td>{{x.properties.time | date:'yyyy-MM-dd HH:mm:ss'}}</td>
<td>{{x.properties.mag}}</td>
</tr>
</table>
</div>
</body>
</html>