<commit_before>import Ember from 'ember';
import { setDefaultHighChartOptions } from '../utils/option-loader';

export default Ember.Component.extend({
  classNames: ['highcharts-wrapper'],
  content: undefined,
  mode:    undefined,
  chartOptions: undefined,
  chart: null,
  theme: undefined,

  buildOptions: Ember.computed('chartOptions', 'content.@each.isLoaded', function() {
    var chartContent, chartOptions, defaults;

    chartOptions = jQuery.extend(true, this.get('theme'), this.get('chartOptions'));
    chartContent = this.get('content.length') ? this.get('content') : [{
      id: 'noData',
      data: 0,
      color: '#aaaaaa'
    }];
    defaults = {
      series: chartContent
    };
    return Ember.merge(defaults, chartOptions);
  }),

  _renderChart: (function() {
    this.drawLater();
    setDefaultHighChartOptions(this.container);
  }).on('didInsertElement'),

  contentDidChange: Ember.observer('content.@each.isLoaded', function() {
    var chart;
    if (!(this.get('content') && this.get('chart'))) {
      return;
    }
    chart = this.get('chart');
    return this.get('content').forEach(function(series, idx) {
      var _ref;
      if ((_ref = chart.get('noData')) != null) {
        _ref.remove();
      }
      if (chart.series[idx]) {
        return chart.series[idx].setData(series.data);
      } else {<commit_msg>removed extra line<commit_after>import Ember from 'ember';
import { setDefaultHighChartOptions } from '../utils/option-loader';

export default Ember.Component.extend({
  classNames: ['highcharts-wrapper'],
  content: undefined,
  mode:    undefined,
  chartOptions: undefined,
  chart: null,
  theme: undefined,

  buildOptions: Ember.computed('chartOptions', 'content.@each.isLoaded', function() {
    var chartContent, chartOptions, defaults;
    chartOptions = jQuery.extend(true, this.get('theme'), this.get('chartOptions'));
    chartContent = this.get('content.length') ? this.get('content') : [{
      id: 'noData',
      data: 0,
      color: '#aaaaaa'
    }];
    defaults = {
      series: chartContent
    };
    return Ember.merge(defaults, chartOptions);
  }),

  _renderChart: (function() {
    this.drawLater();
    setDefaultHighChartOptions(this.container);
  }).on('didInsertElement'),

  contentDidChange: Ember.observer('content.@each.isLoaded', function() {
    var chart;
    if (!(this.get('content') && this.get('chart'))) {
      return;
    }
    chart = this.get('chart');
    return this.get('content').forEach(function(series, idx) {
      var _ref;
      if ((_ref = chart.get('noData')) != null) {
        _ref.remove();
      }
      if (chart.series[idx]) {
        return chart.series[idx].setData(series.data);
      } else {
{'fraction_non_alphanumeric': 0.1626195732155997, 'fraction_numerical': 0.0007358351729212656, 'mean_word_length': 3.457377049180328, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 4, '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': '903382', 'n_tokens_mistral': 838, 'n_tokens_neox': 823, 'n_words': 164}