<commit_before>'use strict';

/**
 * @ngdoc function
 * @name ausEnvApp.controller:DetailsCtrl
 * @description
 * # DetailsCtrl
 * Controller of the ausEnvApp
 */
angular.module('ausEnvApp')
  .config(['ChartJsProvider', function (ChartJsProvider) {
    window.onload = function() {
      console.log(document.getElementById("pie"));
      var myPieCanvas = document.getElementById("pie").getContext("2d");
    };
    // Configure all line charts 
    ChartJsProvider.setOptions('Pie', {
      tooltipFontSize: 10,
      tooltipXPadding: 1,

    });
  }])

  .controller('DetailsCtrl', function ($scope,selection,details) {

    /*
  var unit_dict = [];
  unit_dict['frequency'] = "occurrences/year";
  unit_dict['percent'] = "%";
  unit_dict['percent'] = "%";
  unit_dict['m2/m2'] = "m" + "2".sup() + "/m" + "2".sup();
  unit_dict['gC/m2'] = "gC/m" + "2".sup();
  */

  var unit_dict = [];
  unit_dict.frequency = "occurrences/year";
  unit_dict.percent = "%";
  unit_dict['m2/m2'] = "m^2/m^2";
  unit_dict['gC/m2'] = "gC/m^2";
  var firstYear;
  var currentYearIndex = selection.year - firstYear;

  console.log("current year");
  console.log(currentYearIndex);
  $scope.barOptions =  {<commit_msg>remove getElementById('pie')<commit_after>'use strict';

/**
 * @ngdoc function
 * @name ausEnvApp.controller:DetailsCtrl
 * @description
 * # DetailsCtrl
 * Controller of the ausEnvApp
 */
angular.module('ausEnvApp')
  .config(['ChartJsProvider', function (ChartJsProvider) {
    /*
    window.onload = function() {
      console.log(document.getElementById("pie"));
      var myPieCanvas = document.getElementById("pie").getContext("2d");
    };
    */
    // Configure all line charts 
    ChartJsProvider.setOptions('Pie', {
      tooltipFontSize: 10,
      tooltipXPadding: 1,

    });
  }])

  .controller('DetailsCtrl', function ($scope,selection,details) {

    /*
  var unit_dict = [];
  unit_dict['frequency'] = "occurrences/year";
  unit_dict['percent'] = "%";
  unit_dict['percent'] = "%";
  unit_dict['m2/m2'] = "m" + "2".sup() + "/m" + "2".sup();
  unit_dict['gC/m2'] = "gC/m" + "2".sup();
  */

  var unit_dict = [];
  unit_dict.frequency = "occurrences/year";
  unit_dict.percent = "%";
  unit_dict['m2/m2'] = "m^2/m^2";
  unit_dict['gC/m2'] = "gC/m^2";
  var firstYear;
  var currentYearIndex = selection.year - firstYear;

  console.log("current year");
  console.log(currentYearIndex);
  $scope.barOptions =  {
{'fraction_non_alphanumeric': 0.19020172910662825, 'fraction_numerical': 0.013174145738987238, 'mean_word_length': 3.764705882352941, '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': '2535740', 'n_tokens_mistral': 869, 'n_tokens_neox': 840, 'n_words': 135}