<commit_before>define([
  'extensions/collections/matrix',
  'extensions/models/query'
],
function (MatrixCollection, Query) {

  var GroupedTimeshiftCollection = MatrixCollection.extend({
    queryParams: function () {
      return {
        collect: this.options.valueAttr,
        period: this.options.period,
        group_by: this.options.category,
        filter_by: this.options.filterBy ? this.options.filterBy : [],
        duration: this.duration()
      };
    },

    standardDuration: function () {
      if (this.options.duration) {
        return this.options.duration;
      } else {
        return Query.prototype.periods[this.options.period].duration;
      }
    },

    duration: function () {
      var seriesList = this.options.axes && this.options.axes.y,
          maxTimeshift = _.max(seriesList, function (series) {
            return series.timeshift;
          });
      return maxTimeshift.timeshift + this.standardDuration();
    },
<commit_msg>Do not default filter_by parameter in timeshift collection<commit_after>define([
  'extensions/collections/matrix',
  'extensions/models/query'
],
function (MatrixCollection, Query) {

  var GroupedTimeshiftCollection = MatrixCollection.extend({
    queryParams: function () {
      var params = {
        collect: this.options.valueAttr,
        period: this.options.period,
        group_by: this.options.category,
        duration: this.duration()
      };
      if (this.options.filterBy) {
        params.filter_by = this.options.filterBy;
      }
      return params;
    },

    standardDuration: function () {
      if (this.options.duration) {
        return this.options.duration;
      } else {
        return Query.prototype.periods[this.options.period].duration;
      }
    },

    duration: function () {
      var seriesList = this.options.axes && this.options.axes.y,
          maxTimeshift = _.max(seriesList, function (series) {
            return series.timeshift;
          });
      return maxTimeshift.timeshift + this.standardDuration();
    },

{'fraction_non_alphanumeric': 0.1159491193737769, 'fraction_numerical': 0.0, 'mean_word_length': 2.562717770034843, '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': '6428442', 'n_tokens_mistral': 578, 'n_tokens_neox': 556, 'n_words': 105}