<commit_before>angular.module('myApp')
.controller('ChartCtrl', ['userService', 'locationService', 'transactionService', '$scope',
	function (userService, locationService, transactionService, $scope) {

  $scope.transactions = {};
  $scope.chartData = {};
  $scope.chartData.earnings = [];
  $scope.chartData.earningDates = [];

  locationService.getLocations().success(function(response) {
  	$scope.locations = response;
  })

  userService.getUsers().success(function(response) {
  	$scope.users = response;
  })

  transactionService.getTransactions('earning').success(function(response) {
    $scope.transactions.earnings = response;
    $scope.transactions.earnings.forEach(function(el, i, arr) {
      $scope.chartData.earnings.push(el.amount);
      if (i % 20 != 0) { $scope.chartData.earningDates.push("") }
      else { $scope.chartData.earningDates.push(el.created_at.split('T')[0].slice())}
    });
  })

  transactionService.getTransactions('charge').success(function(response) {
    $scope.transactions.charges = response;
  })
  
  // chart.js 

  $scope.labels = $scope.chartData.earningDates;
  $scope.series = ['Earned', 'Charged'];
  $scope.data = [
      $scope.chartData.earnings
  ];
  $scope.options = { showXLabels: 10 }
  $scope.onClick = function (points, evt) {
     console.log(points, evt);
  };


}]);<commit_msg>remove unused showXLabels option - did not work for this chartjs library, might need to be implemented a different way because of Angular integration<commit_after>angular.module('myApp')
.controller('ChartCtrl', ['userService', 'locationService', 'transactionService', '$scope',
	function (userService, locationService, transactionService, $scope) {

  $scope.transactions = {};
  $scope.chartData = {};
  $scope.chartData.earnings = [];
  $scope.chartData.earningDates = [];

  locationService.getLocations().success(function(response) {
  	$scope.locations = response;
  })

  userService.getUsers().success(function(response) {
  	$scope.users = response;
  })

  transactionService.getTransactions('earning').success(function(response) {
    $scope.transactions.earnings = response;
    $scope.transactions.earnings.forEach(function(el, i, arr) {
      $scope.chartData.earnings.push(el.amount);
      if (i % 20 != 0) { $scope.chartData.earningDates.push("") }
      else { $scope.chartData.earningDates.push(el.created_at.split('T')[0].slice())}
    });
  })

  transactionService.getTransactions('charge').success(function(response) {
    $scope.transactions.charges = response;
  })
  
  // chart.js 

  $scope.labels = $scope.chartData.earningDates;
  $scope.series = ['Earned', 'Charged'];
  $scope.data = [
      $scope.chartData.earnings
  ];
  $scope.onClick = function (points, evt) {
     console.log(points, evt);
  };


}]);
{'fraction_non_alphanumeric': 0.1644524236983842, 'fraction_numerical': 0.003590664272890485, 'mean_word_length': 4.39922480620155, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '372755', 'n_tokens_mistral': 911, 'n_tokens_neox': 887, 'n_words': 129}