<commit_before>'use strict';

/**
 * @ngdoc directive
 * @name tagrefineryGuiApp.directive:d3Hist
 * @description
 * # d3Hist
 */
angular.module('tagrefineryGuiApp')
  .directive('d3Hist', ["d3", "$timeout", function (d3, $timeout) {
    var basics = function (scope, element) {
      // Number formating
      scope.formatCount = d3.format(",.0f");

      if(scope.isFloat)
      {
        scope.formatMarker = d3.format(",.3f");
        scope.formatTicks = d3.format(",.2f");
      }
      else
      {
        scope.formatMarker = d3.format(",.0f");
        scope.formatTicks = d3.format(",.0f");
      }

      // Custom x scaling function
      scope.xScaling = function () {
        scope.ticks = [];
        scope.dx = (scope.x.domain()[1] - scope.x.domain()[0]) / scope.binCount;

        // Define ticks
        for (var j = 0; j <= scope.binCount; j++) {
          scope.ticks.push(scope.x.domain()[0] + j * scope.dx);
        }
      };

      scope.yScaling = function () {
        // y scaling<commit_msg>Fixed warning<commit_after>'use strict';

/**
 * @ngdoc directive
 * @name tagrefineryGuiApp.directive:d3Hist
 * @description
 * # d3Hist
 */
angular.module('tagrefineryGuiApp')
  .directive('d3Hist', ["d3", "$timeout", function (d3, $timeout) {
    var basics = function (scope) {
      // Number formating
      scope.formatCount = d3.format(",.0f");

      if(scope.isFloat)
      {
        scope.formatMarker = d3.format(",.3f");
        scope.formatTicks = d3.format(",.2f");
      }
      else
      {
        scope.formatMarker = d3.format(",.0f");
        scope.formatTicks = d3.format(",.0f");
      }

      // Custom x scaling function
      scope.xScaling = function () {
        scope.ticks = [];
        scope.dx = (scope.x.domain()[1] - scope.x.domain()[0]) / scope.binCount;

        // Define ticks
        for (var j = 0; j <= scope.binCount; j++) {
          scope.ticks.push(scope.x.domain()[0] + j * scope.dx);
        }
      };

      scope.yScaling = function () {
        // y scaling
{'fraction_non_alphanumeric': 0.17414898865318204, 'fraction_numerical': 0.018746916625555006, 'mean_word_length': 2.1152073732718892, 'pattern_counts': {'":': 0, '<': 5, '<?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': '4603696', 'n_tokens_mistral': 686, 'n_tokens_neox': 679, 'n_words': 121}