<commit_before>App.BarChartComponent = Ember.Component.extend({
  tagName: 'svg',
  attributeBindings: 'width'.w(),
  barHeight: 20,

  w: function () {
    return this.get('width') - 200 - 20;
  }.property('width'),

  transformG: function () {
    return "translate(" + 200 + "," + "22" + ")";
  }.property(),

  draw: function () {
    var width = this.get('w');
    var data = this.get('data').sort(function (a, b) {
      return d3.descending(a.value, b.value);
    });

    var svg = d3.select('#' + this.get('elementId'));

    var x = d3.scale.linear().range([0, width]);
    var y = d3.scale.ordinal().rangeRoundBands([0, data.length * this.get('barHeight')], 0.1);

    var xAxis = d3.svg.axis().scale(x).orient("top").tickFormat(d3.format("d")).tickSubdivide(0);
    var yAxis = d3.svg.axis().scale(y).orient("left");

    var max = d3.max(data, function (d) {<commit_msg>Make sure everything is a number<commit_after>App.BarChartComponent = Ember.Component.extend({
  tagName: 'svg',
  attributeBindings: 'width'.w(),
  barHeight: 20,

  w: function () {
    return this.get('width') - 200 - 20;
  }.property('width'),

  transformG: function () {
    return "translate(" + 200 + "," + "22" + ")";
  }.property(),

  draw: function () {
    var width = this.get('w');
    var data = this.get('data').sort(function (a, b) {
      return d3.descending(+a.value, +b.value);
    });

    var svg = d3.select('#' + this.get('elementId'));

    var x = d3.scale.linear().range([0, width]);
    var y = d3.scale.ordinal().rangeRoundBands([0, data.length * this.get('barHeight')], 0.1);

    var xAxis = d3.svg.axis().scale(x).orient("top").tickFormat(d3.format("d")).tickSubdivide(0);
    var yAxis = d3.svg.axis().scale(y).orient("left");

    var max = d3.max(data, function (d) {
{'fraction_non_alphanumeric': 0.21600447677672077, 'fraction_numerical': 0.027979854504756575, 'mean_word_length': 3.4477611940298507, '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': '3941753', 'n_tokens_mistral': 678, 'n_tokens_neox': 634, 'n_words': 125}