<commit_before>define([
  'extensions/views/graph/graph'
],
function (Graph) {
  var Sparkline = Graph.extend({

    minYDomainExtent: 0,
    numYTicks: 1,

    initialize: function (options) {
      Graph.prototype.initialize.apply(this, arguments);

      this.period = options.period;
      this.showTooltip = options.showTooltip;
      this.showEndTicks = options.showEndTicks;
    },

    getConfigNames: function () {
      return ['overlay', this.period || 'month', 'ymin'];
    },

    components: function () {
      var val = [
        {
          view: this.sharedComponents.line,
          options: { allowMissingData: true }
        },
        { view: this.sharedComponents.hover }
      ];

      if (this.showEndTicks) {
        val.push({
          view: this.sharedComponents.yaxis
        });
        val.push({
          view: this.sharedComponents.yaxisRight
        });
      }

      return val;
    }
  });

  return Sparkline;
});
<commit_msg>Rationalise code<commit_after>define([
  'extensions/views/graph/graph'
],
function (Graph) {
  var Sparkline = Graph.extend({

    minYDomainExtent: 0,
    numYTicks: 1,

    initialize: function (options) {
      Graph.prototype.initialize.apply(this, arguments);

      this.period = options.period;
      this.showTooltip = options.showTooltip;
      this.showEndTicks = options.showEndTicks;
    },

    getConfigNames: function () {
      return ['overlay', this.period || 'month', 'ymin'];
    },

    components: function () {
      var val = [
        {
          view: this.sharedComponents.line,
          options: { allowMissingData: true }
        },
        { view: this.sharedComponents.hover }
      ];

      if (this.showEndTicks) {
        val.push({
          view: this.sharedComponents.yaxis
        },
        {
          view: this.sharedComponents.yaxisRight
        });
      }

      return val;
    }
  });

  return Sparkline;
});

{'fraction_non_alphanumeric': 0.12714063310845874, 'fraction_numerical': 0.0020757654385054488, 'mean_word_length': 2.0947030497592296, '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': '6985529', 'n_tokens_mistral': 591, 'n_tokens_neox': 570, 'n_words': 104}