<commit_before>{% extends 'stat/layout.html.twig' %}

{% trans_default_domain 'stat' %}

{% block body %}

    <div id="page-stat-themes">

        <div id="menu-secondary">
            <h1>{{ 'themes.title'|trans }}</h1>
            <nav>
                <a href="{{ path('app_stat_index') }}" class="button">
                    <span class="fi-arrow-left"></span>
                    {{ 'action.back'|trans({},'messages') }}
                </a>
            </nav>
        </div>

        {{ include('default/_flash_messages.html.twig') }}

        {{ form_start(formSearch) }}
        <div class="search0">
            {{ form_row(formSearch.season) }}
            {{ form_row(formSearch.level) }}
            <div>
                <button type="submit" class="button primary">
                    <span class="fi-filter"></span>
                    {{ 'action.search'|trans({},'messages') }}
                </button>
            </div>
        </div>
        {{ form_end(formSearch) }}

        <div id="graph"></div>

    </div>

{% endblock %}

{% block javascripts %}

    {{ parent() }}
    <script type="text/javascript" src="{{ asset('assets/vendor/highcharts/highcharts.js') }}"></script>
    <script type="text/javascript" src="{{ asset('assets/vendor/highcharts/modules/exporting.js') }}"></script>
    <script type="text/javascript">
        $(function () {
            Highcharts.chart(
                'graph',
                {
                    chart: {
                        type: 'bar',
                        height: {{ results.categories|length*40 }}
                    },
                    title: false,
                    legend: {
                        align: 'right',
                        verticalAlign: 'top',
                        layout: 'vertical',
                        y: 30
                    },
                    xAxis: {
                        categories: $.parseJSON('{{ results.categories|json_encode|raw }}')
                    },
                    yAxis: {
                        title: false
                    },
                    tooltip: {
                        pointFormat: '<span style="color:{series.color}">{series.name}</span>: <b>{point.y}</b> ({point.percentage:.0f}%)<br/>',
                        shared: true
                    },
                    plotOptions: {
                        series: {
                            stacking: 'percent'
                        }<commit_msg>Set chart height<commit_after>{% extends 'stat/layout.html.twig' %}

{% trans_default_domain 'stat' %}

{% block body %}

    <div id="page-stat-themes">

        <div id="menu-secondary">
            <h1>{{ 'themes.title'|trans }}</h1>
            <nav>
                <a href="{{ path('app_stat_index') }}" class="button">
                    <span class="fi-arrow-left"></span>
                    {{ 'action.back'|trans({},'messages') }}
                </a>
            </nav>
        </div>

        {{ include('default/_flash_messages.html.twig') }}

        {{ form_start(formSearch) }}
        <div class="search0">
            {{ form_row(formSearch.season) }}
            {{ form_row(formSearch.level) }}
            <div>
                <button type="submit" class="button primary">
                    <span class="fi-filter"></span>
                    {{ 'action.search'|trans({},'messages') }}
                </button>
            </div>
        </div>
        {{ form_end(formSearch) }}

        <div id="graph"></div>

    </div>

{% endblock %}

{% block javascripts %}

    {{ parent() }}
    <script type="text/javascript" src="{{ asset('assets/vendor/highcharts/highcharts.js') }}"></script>
    <script type="text/javascript" src="{{ asset('assets/vendor/highcharts/modules/exporting.js') }}"></script>
    <script type="text/javascript">
        $(function () {
            Highcharts.chart(
                'graph',
                {
                    chart: {
                        type: 'bar',
                        height: {{ max(results.categories|length*30,300) }}
                    },
                    title: false,
                    legend: {
                        align: 'right',
                        verticalAlign: 'top',
                        layout: 'vertical',
                        y: 30
                    },
                    xAxis: {
                        categories: $.parseJSON('{{ results.categories|json_encode|raw }}')
                    },
                    yAxis: {
                        title: false
                    },
                    tooltip: {
                        pointFormat: '<span style="color:{series.color}">{series.name}</span>: <b>{point.y}</b> ({point.percentage:.0f}%)<br/>',
                        shared: true
                    },
                    plotOptions: {
                        series: {
                            stacking: 'percent'
                        }
{'fraction_non_alphanumeric': 0.1563130294473578, 'fraction_numerical': 0.0038321903993545786, 'mean_word_length': 1.1855442926399296, 'pattern_counts': {'":': 0, '<': 67, '<?xml version=': 0, '>': 67, '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': '6426612', 'n_tokens_mistral': 1348, 'n_tokens_neox': 1216, 'n_words': 202}