<commit_before>{% extends "vote_layout/layout_vote_no_ember.html" %}
{% from "_formhelpers.html" import renderMessages %}

{% block body %}

<div id="messages" class="message-container">
    {{ renderMessages() }}
</div>

<section class="main-content stats">
    <div class="row">
        <div class="col-xs-12">
            <h2>Statistiken</h2>

            <h3>Votes</h3>
            <canvas id="myChart" width="400" height="400"></canvas>

            <h3>Benutzer</h3>
            <canvas id="myChartUsers" width="400" height="400"></canvas>
        </div>
    </div>
</section>

{% endblock %}

{% block inlinejs %}
    <script src="{{ url_for('static', filename='js/vendor/voters/05-Chart.min.js') }}"></script>

    <script type="text/javascript">
        // Get context with jQuery - using jQuery's .get() method.
        var ctx = $("#myChart").get(0).getContext("2d");
        var ctxUsers = $("#myChartUsers").get(0).getContext("2d");

        var json_users = [];
        var json_labels = [];
        var json_votes = [];
        $.getJSON( "{{ url_for('vote.stats.vote_json') }}", function( data ) {
            for (var day in data) {
                var obj = data[day];
                json_labels.push(day);
                json_votes.push(obj.votes);
                json_users.push(obj.user)
            }

            var data_json_votes = {
                labels: json_labels,
                datasets: [
                    {
                        label: "Votes",
                        fillColor: "rgba(220,220,220,0.2)",
                        strokeColor: "rgba(220,220,220,1)",
                        pointColor: "rgba(220,220,220,1)",<commit_msg>Use another chart.js file<commit_after>{% extends "vote_layout/layout_vote_no_ember.html" %}
{% from "_formhelpers.html" import renderMessages %}

{% block body %}

<div id="messages" class="message-container">
    {{ renderMessages() }}
</div>

<section class="main-content stats">
    <div class="row">
        <div class="col-xs-12">
            <h2>Statistiken</h2>

            <h3>Votes</h3>
            <canvas id="myChart" width="400" height="400"></canvas>

            <h3>Benutzer</h3>
            <canvas id="myChartUsers" width="400" height="400"></canvas>
        </div>
    </div>
</section>

{% endblock %}

{% block inlinejs %}
    <script src="{{ url_for('static', filename='js/vendor/07-chart.min.js') }}"></script>

    <script type="text/javascript">
        // Get context with jQuery - using jQuery's .get() method.
        var ctx = $("#myChart").get(0).getContext("2d");
        var ctxUsers = $("#myChartUsers").get(0).getContext("2d");

        var json_users = [];
        var json_labels = [];
        var json_votes = [];
        $.getJSON( "{{ url_for('vote.stats.vote_json') }}", function( data ) {
            for (var day in data) {
                var obj = data[day];
                json_labels.push(day);
                json_votes.push(obj.votes);
                json_users.push(obj.user)
            }

            var data_json_votes = {
                labels: json_labels,
                datasets: [
                    {
                        label: "Votes",
                        fillColor: "rgba(220,220,220,0.2)",
                        strokeColor: "rgba(220,220,220,1)",
                        pointColor: "rgba(220,220,220,1)",
{'fraction_non_alphanumeric': 0.16701337295690935, 'fraction_numerical': 0.03387815750371471, 'mean_word_length': 1.911764705882353, 'pattern_counts': {'":': 0, '<': 45, '<?xml version=': 0, '>': 45, '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': '225778', 'n_tokens_mistral': 1112, 'n_tokens_neox': 1011, 'n_words': 188}