{"size": 1450, "ext": "js", "max_stars_repo_path": "public/controllers/graphCtrl.js", "max_stars_repo_name": "thomashzhang/InternPoints", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "public/controllers/graphCtrl.js", "max_issues_repo_name": "thomashzhang/InternPoints", "max_issues_repo_issues_event_min_datetime": "2017-06-08T06:59:09.000Z", "max_issues_repo_issues_event_max_datetime": "2017-06-08T06:59:09.000Z", "max_forks_repo_path": "public/controllers/graphCtrl.js", "max_forks_repo_name": "thomashzhang/InternPoints", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": 1, "max_forks_count": null, "avg_line_length": 42.6470588235, "max_line_length": 114, "alphanum_fraction": 0.3910344828}
"use strict";
var GraphController;
(function (GraphController) {
    var myApp = angular.module('myApp');
    myApp.controller('GraphCtrl', ['$scope', '$http', '$timeout', function ($scope, $http, $timeout, $location) {
            var refresh = function () {
                $http.get('/interns').then(doneCallbacks, failCallbacks);
                function doneCallbacks(res) {
                    $scope.options = {
                        scales: {
                            xAxes: [{
                                    stacked: true,
                                }],
                            yAxes: [{
                                    stacked: true
                                }]
                        }
                    };
                    $scope.labels = res.data.map(function (i) { return i.name; });
                    $scope.series = ['GitHub Points', 'Trello Points'];
                    $scope.data = [
                        res.data.map(function (i) { return i.points; }),
                        res.data.map(function (i) { return i.points; })
                    ];
                    $scope.colors = ['#97BBCD', '#DCDCDC', '#F7464A', '#46BFBD', '#FDB45C', '#949FB1', '#4D5360'];
                }
                function failCallbacks(err) {
                    console.log(err.message);
                }
            };
            refresh();
        }]);
})(GraphController || (GraphController = {}));
