<commit_before>= javascript_tag "var basic_chart_tab = new Array()"

#basic_charts_form
  %h2 Basic statistics about Measures of Effectiveness
  = form_tag(histogram_experiment_path(@experiment.id), onsubmit: "$('#busy_basic').show();", remote: true, format: :js) do
    %span
      Select MoE:
      = select_tag("moe_name", "", {:class => "moe_list"}) 
    = 'Number of bars:'
    = text_field_tag 'resolution', 10

    = submit_tag "Add chart", :class => "nice_button", :style => "float: none;"
    = image_tag "loading.gif", :size => "16x16", :style => "display: none", :id => "busy_basic"

#basic_charts


:javascript
  $('#basic_charts_form input[type=submit]').bind('click', function() {
    var moe_name = $('#basic_charts_form select[name=\'moe_name\'] option:selected').val();
    var resolution = $('#basic_charts_form input[name=\'resolution\']').val();

    $.post("#{histogram_experiment_path(@experiment.id)}", { 'moe_name': moe_name, 'resolution': resolution },
     function(data) {

    });


    return false;
  });<commit_msg>Adding new methods for histogram charts for showing experiments MoE.<commit_after>= javascript_tag "var basic_chart_tab = new Array()"

#basic_charts_form
  %h2 Basic statistics about Measures of Effectiveness
  %div
    %span
      Select MoE:
      = select_tag 'moe_name', '', { class: 'moe_list' }
    = 'Number of bars:'
    = text_field_tag 'resolution', 10

    = submit_tag 'Load chart', class: 'nice_button', style: 'float: none;'
    = image_tag 'loading.gif', :id => 'busy_basic', size: '16x16', style: 'display: none'
#basic_charts

:javascript
  // 'Load chart' button handler
  $('#basic_charts_form input[type=submit]').bind('click', function() {
    $('#busy_basic').show();

    var moe_name = $('#basic_charts_form select[name=\'moe_name\'] option:selected').val();
    var resolution = $('#basic_charts_form input[name=\'resolution\']').val();

    $.post("#{histogram_experiment_path(@experiment.id)}",
      { 'moe_name': moe_name, 'resolution': resolution },
      function(data) { $('#busy_basic').hide(); }
    );

    return false;
  });
{'fraction_non_alphanumeric': 0.17647058823529413, 'fraction_numerical': 0.006641366223908918, 'mean_word_length': 4.520942408376963, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 10, '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': '5448003', 'n_tokens_mistral': 724, 'n_tokens_neox': 681, 'n_words': 155}