<commit_before>module.exports = function ratingsChart(ratings) {
    $("#solo").append(ratings[0] ? ratings[0].soloCompetitiveRank : "N/A");
    $("#party").append(ratings[0] ? ratings[0].competitiveRank : "N/A");
    //sort ratings by time
    ratings.sort(function(a, b) {
        return a.time - b.time;
    });
    var times = ratings.map(function(r) {
        return new Date(r.time);
    });
    var solo = ratings.map(function(r) {
        return r.soloCompetitiveRank;
    });
    var party = ratings.map(function(r) {
        return r.competitiveRank;
    });
    c3.generate({
        bindto: "#ratings",
        data: {
            columns: [
          ['Solo'].concat(solo),
          ['Party'].concat(party)
          ],
            type: "spline"
        },
        axis: {
            x: {
                label: "Date",<commit_msg>corrected rating display<commit_after>module.exports = function ratingsChart(ratings) {
    //sort ratings by time
    ratings.sort(function(a, b) {
        return a.time - b.time;
    });
    $("#solo").append(ratings[0] ? ratings[ratings.length - 1].soloCompetitiveRank : "N/A");
    $("#party").append(ratings[0] ? ratings[ratings.length - 1].competitiveRank : "N/A");
    var times = ratings.map(function(r) {
        return new Date(r.time);
    });
    var solo = ratings.map(function(r) {
        return r.soloCompetitiveRank;
    });
    var party = ratings.map(function(r) {
        return r.competitiveRank;
    });
    c3.generate({
        bindto: "#ratings",
        data: {
            columns: [
          ['Solo'].concat(solo),
          ['Party'].concat(party)
          ],
            type: "spline"
        },
        axis: {
            x: {
                label: "Date",
{'fraction_non_alphanumeric': 0.1633122484186314, 'fraction_numerical': 0.005750431282346176, 'mean_word_length': 1.9845626072041167, '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': '5184867', 'n_tokens_mistral': 559, 'n_tokens_neox': 552, 'n_words': 97}