<commit_before>var BaseChart = require('./base-chart');
var moment = require('moment-timezone');

function ttLabel (tooltip, data) {
  var point = data.datasets[tooltip.datasetIndex].data[tooltip.index];
  var axes = data.datasets[0].spotAxes;

  var label = [
    'x (' + axes.x + ') ' + point.a,
    'y (' + axes.y + ') ' + point.b
  ];
  if (axes.r) {
    label.push('radius (' + axes.r + ') ' + point.bb);
  }
  if (axes.c) {
    label.push('color (' + axes.c + ' ) ' + point.aa);
  }
  label.push('Number of points in bin ' + point.count);
  return label;
}

module.exports = BaseChart.extend({
  initialize: function () {
    this.slots.reset([
      {
        description: 'X axis',
        type: 'partition',
        rank: 1,
        required: true
      },
      {
        description: 'Y axis',
        type: 'partition',
        rank: 2,
        required: true
      },
      {
        description: 'Point color',
        type: 'aggregate',
        rank: 1,
        required: false
      },
      {
        description: 'Point size',
        type: 'aggregate',
        rank: 2,
        required: false
      },
      {
        description: 'X error',
        type: 'aggregate',
        rank: 3,
        required: false
      },
      {
        description: 'Y error',
        type: 'aggregate',
        rank: 4,
        required: false
      }
    ]);
  },
  chartjsConfig: function () {
    return {
      type: 'bubbleError',
      data: {
        datasets: []
      },
      options: {
        title: {
          display: true,
          position: 'top'
        },
        legend: {
          display: false
        },
        scales: {
          xAxes: [{
            type: 'linear',
            position: 'bottom',
            gridLines: {
              zeroLineColor: 'rgba(0,255,0,1)'
            },
            scaleLabel: {
              display: true
            },
            time: {
              parser: function (label) {
                return moment(label, moment.ISO_8601);
              }
            }
          }],
          yAxes: [{
            type: 'linear',
            position: 'left',
            gridLines: {
              zeroLineColor: 'rgba(0,255,0,1)'
            },
            scaleLabel: {
              display: true
            },
            time: {
              parser: function (label) {
                return moment(label, moment.ISO_8601);
              }
            }
          }]
        },
        tooltips: {
          enabled: true,
          mode: 'single',
          callbacks: {
            label: ttLabel
          }
        }
      }
    };
  }
});
<commit_msg>Disable scatterplot animation<commit_after>var BaseChart = require('./base-chart');
var moment = require('moment-timezone');

function ttLabel (tooltip, data) {
  var point = data.datasets[tooltip.datasetIndex].data[tooltip.index];
  var axes = data.datasets[0].spotAxes;

  var label = [
    'x (' + axes.x + ') ' + point.a,
    'y (' + axes.y + ') ' + point.b
  ];
  if (axes.r) {
    label.push('radius (' + axes.r + ') ' + point.bb);
  }
  if (axes.c) {
    label.push('color (' + axes.c + ' ) ' + point.aa);
  }
  label.push('Number of points in bin ' + point.count);
  return label;
}

module.exports = BaseChart.extend({
  initialize: function () {
    this.slots.reset([
      {
        description: 'X axis',
        type: 'partition',
        rank: 1,
        required: true
      },
      {
        description: 'Y axis',
        type: 'partition',
        rank: 2,
        required: true
      },
      {
        description: 'Point color',
        type: 'aggregate',
        rank: 1,
        required: false
      },
      {
        description: 'Point size',
        type: 'aggregate',
        rank: 2,
        required: false
      },
      {
        description: 'X error',
        type: 'aggregate',
        rank: 3,
        required: false
      },
      {
        description: 'Y error',
        type: 'aggregate',
        rank: 4,
        required: false
      }
    ]);
  },
  chartjsConfig: function () {
    return {
      type: 'bubbleError',
      data: {
        datasets: []
      },
      options: {
        animation: false,
        title: {
          display: true,
          position: 'top'
        },
        legend: {
          display: false
        },
        scales: {
          xAxes: [{
            type: 'linear',
            position: 'bottom',
            gridLines: {
              zeroLineColor: 'rgba(0,255,0,1)'
            },
            scaleLabel: {
              display: true
            },
            time: {
              parser: function (label) {
                return moment(label, moment.ISO_8601);
              }
            }
          }],
          yAxes: [{
            type: 'linear',
            position: 'left',
            gridLines: {
              zeroLineColor: 'rgba(0,255,0,1)'
            },
            scaleLabel: {
              display: true
            },
            time: {
              parser: function (label) {
                return moment(label, moment.ISO_8601);
              }
            }
          }]
        },
        tooltips: {
          enabled: true,
          mode: 'single',
          callbacks: {
            label: ttLabel
          }
        }
      }
    };
  }
});

{'fraction_non_alphanumeric': 0.1362264150943396, 'fraction_numerical': 0.010188679245283019, 'mean_word_length': 1.2395437262357414, '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': '4130384', 'n_tokens_mistral': 1610, 'n_tokens_neox': 1545, 'n_words': 328}