<commit_before>var getSubtitle = function() {
  var subtitle = "";

  if(document.ontouchstart === undefined) {
    subtitle += "<%= I18n.t('highcharts.subtitle.desktop') %>";
  } else {
    subtitle += "<%= I18n.t('highcharts.subtitle.mobile') %>";
  }

  subtitle += "<br><%= I18n.t('highcharts.subtitle.commit_url') %>";
  return subtitle;
}

var drawChart = function(chartClass) {
  $(chartClass).each(function() {
    $this = $(this);

    if($this.length) {
      $this.highcharts({
        chart: {
          zoomType: 'x'
        },
        subtitle: {
          text: getSubtitle()
        },
        title: {
          text: ""
        },
        exporting: {
          enabled: false
        },
        tooltip: {
          useHTML: true,
          crosshairs: true,
          shared: true,
          positioner: function (labelWidth, labelHeight, point) {
            if ((this.chart.chartWidth / 2) > point.plotX ) {
              return { x: this.chart.chartWidth - labelWidth - 20, y: 50 };
            } else {
              return { x: 80, y: 50 };
            }
          },
          shadow: false,
          animation: false,
          shape: 'square'
        },
        xAxis: {
          categories: $this.data('categories'),
          labels: {
            formatter: function () {
              var date = /Commit Date: (\d{4}-\d{2}-\d{2})/.exec(this.value);
              if (date != null) {
                return date[1];
              }
            }
          },
          tickInterval: $this.data('tick-interval')
        },
        yAxis: {
          title: {
            text: $this.data('unit'),
          },
          min: 0
        },
        legend: {
          layout: 'horizontal',
          align: 'center',
          verticalAlign: 'bottom'
        },
        series: $this.data('columns'),
        plotOptions: {
          series: {
            point: {
              events: {
                click: function() {
                  var getCommitHash = function(category) {
                    return /^Commit: (.{7})/.exec(category)[1];
                  }

                  var getCommitMessage = function(category) {<commit_msg>Turn off animation for charts.<commit_after>var getSubtitle = function() {
  var subtitle = "";

  if(document.ontouchstart === undefined) {
    subtitle += "<%= I18n.t('highcharts.subtitle.desktop') %>";
  } else {
    subtitle += "<%= I18n.t('highcharts.subtitle.mobile') %>";
  }

  subtitle += "<br><%= I18n.t('highcharts.subtitle.commit_url') %>";
  return subtitle;
}

var drawChart = function(chartClass) {
  $(chartClass).each(function() {
    $this = $(this);

    if($this.length) {
      $this.highcharts({
        chart: {
          zoomType: 'x'
        },
        subtitle: {
          text: getSubtitle()
        },
        title: {
          text: ""
        },
        exporting: {
          enabled: false
        },
        tooltip: {
          useHTML: true,
          crosshairs: true,
          shared: true,
          positioner: function (labelWidth, labelHeight, point) {
            if ((this.chart.chartWidth / 2) > point.plotX ) {
              return { x: this.chart.chartWidth - labelWidth - 20, y: 50 };
            } else {
              return { x: 80, y: 50 };
            }
          },
          shadow: false,
          animation: false,
          shape: 'square'
        },
        xAxis: {
          categories: $this.data('categories'),
          labels: {
            formatter: function () {
              var date = /Commit Date: (\d{4}-\d{2}-\d{2})/.exec(this.value);
              if (date != null) {
                return date[1];
              }
            }
          },
          tickInterval: $this.data('tick-interval')
        },
        yAxis: {
          title: {
            text: $this.data('unit'),
          },
          min: 0
        },
        legend: {
          layout: 'horizontal',
          align: 'center',
          verticalAlign: 'bottom'
        },
        series: $this.data('columns'),
        plotOptions: {
          series: {
            animation: false,
            point: {
              events: {
                click: function() {
                  var getCommitHash = function(category) {
                    return /^Commit: (.{7})/.exec(category)[1];
                  }

                  var getCommitMessage = function(category) {
{'fraction_non_alphanumeric': 0.14598041448417218, 'fraction_numerical': 0.01002049647005238, 'mean_word_length': 1.3562231759656653, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 13, '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': '3943255', 'n_tokens_mistral': 1299, 'n_tokens_neox': 1240, 'n_words': 244}