<commit_before>$(document).ready(function() {
var subscribersdata = {
    labels: [
      <% @subscribersorted.each_pair do |x, y| %>
        "<%= x.to_s.truncate(20) %>",
      <% end %>
    ],
    datasets: [
        {
            label: "Top 10 Posts",
            fillColor: "rgba(220,220,220,0.2)",
            strokeColor: "rgba(220,220,220,1)",
            pointColor: "rgba(220,220,220,1)",
            pointStrokeColor: "#fff",
            pointHighlightFill: "#fff",
            pointHighlightStroke: "rgba(220,220,220,1)",
            data: [
              <% @subscribersorted.each_pair do |x, y| %>
                <%= y.to_i %>,
              <% end %>
            ]
        }
    ]
};

var subscribersoptions = {

    ///Boolean - Whether grid lines are shown across the chart
    scaleShowGridLines : true,
<commit_msg>fix a bug with truncate<commit_after>$(document).ready(function() {
var subscribersdata = {
    labels: [
      <% @subscribersorted.each_pair do |x, y| %>
        "<%= truncate(x, length: 20, escape: false) %>",
      <% end %>
    ],
    datasets: [
        {
            label: "Top 10 Posts",
            fillColor: "rgba(220,220,220,0.2)",
            strokeColor: "rgba(220,220,220,1)",
            pointColor: "rgba(220,220,220,1)",
            pointStrokeColor: "#fff",
            pointHighlightFill: "#fff",
            pointHighlightStroke: "rgba(220,220,220,1)",
            data: [
              <% @subscribersorted.each_pair do |x, y| %>
                <%= y.to_i %>,
              <% end %>
            ]
        }
    ]
};

var subscribersoptions = {

    ///Boolean - Whether grid lines are shown across the chart
    scaleShowGridLines : true,

{'fraction_non_alphanumeric': 0.1553855208946439, 'fraction_numerical': 0.052972336668628606, 'mean_word_length': 1.8006589785831961, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, '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': '6118913', 'n_tokens_mistral': 622, 'n_tokens_neox': 531, 'n_words': 102}