<commit_before>{% extends "base.html" %}

{% load static %}
{% load correlation_tags %}

{% block content %}
    <script src="{% static "js/correlations.js" %}"></script>

    <div class="container" ng-controller="CorrelationsController">
        <div ng-init="selected_correlation = '{{ metric_results.keys.0 }}'"></div>

        <select class="form-control correlation_selector" ng-model="selected_correlation" ng-change="resize_graph()">
            {% for metric_name in metric_results.keys %}
                <option>{{ metric_name }}</option>
            {% endfor %}
        </select>

        {% for metric_name, metric_tuple in metric_results.items %}
            <div id="correlation_{{ metric_name|cut:" "|cut:"?" }}" ng-show="selected_correlation == '{{ metric_name }}'"></div>

            <script type="text/javascript">
                $(function() {
                    $('#correlation_{{ metric_name|cut:" "|cut:"?" }}').highcharts({
                        chart: {
                            type: 'column'
                        },
                        title: {
                            text: '{{ metric_name|capfirst }}'
                        },
                        xAxis: {
                            categories: [
                                {% for metric_name1, metric_name2, result in metric_tuple %}
                                    '{{ metric_name2 }}',
                                {% endfor %}
                            ]
                        },
                        yAxis: {
                            min: -1,
                            max: 1
                        },
                        credits: {
                            enabled: false
                        },
                        series: [
                            {
                                name: 'Correlation',
                                data: [
                                    {% for metric_name1, metric_name2, result in metric_tuple %}
                                        {% if result|is_numeric %}
                                            {
                                                y: {{ result }},
                                                color: {% if result > 0 %}'#7cb5ec'{% else %}'#F16565'{% endif %}
                                            },
                                        {% else %}
                                            0,
                                        {% endif %}
                                    {% endfor %}
                                ]
                            }
                        ]
                    });
                });
            </script>
        {% endfor %}
    </div>
{% endblock %}
<commit_msg>removes legend labels<commit_after>{% extends "base.html" %}

{% load static %}
{% load correlation_tags %}

{% block content %}
    <script src="{% static "js/correlations.js" %}"></script>

    <div class="container" ng-controller="CorrelationsController">
        <div ng-init="selected_correlation = '{{ metric_results.keys.0 }}'"></div>

        <select class="form-control correlation_selector" ng-model="selected_correlation" ng-change="resize_graph()">
            {% for metric_name in metric_results.keys %}
                <option>{{ metric_name }}</option>
            {% endfor %}
        </select>

        {% for metric_name, metric_tuple in metric_results.items %}
            <div id="correlation_{{ metric_name|cut:" "|cut:"?" }}" ng-show="selected_correlation == '{{ metric_name }}'"></div>

            <script type="text/javascript">
                $(function() {
                    $('#correlation_{{ metric_name|cut:" "|cut:"?" }}').highcharts({
                        chart: {
                            type: 'column'
                        },
                        title: {
                            text: '{{ metric_name|capfirst }}'
                        },
                        legend: {
                            enabled: false
                        },
                        xAxis: {
                            categories: [
                                {% for metric_name1, metric_name2, result in metric_tuple %}
                                    '{{ metric_name2 }}',
                                {% endfor %}
                            ]
                        },
                        yAxis: {
                            min: -1,
                            max: 1,
                            tickInterval: .25,
                            gridLineColor: '#efefef'
                        },
                        credits: {
                            enabled: false
                        },
                        series: [
                            {
                                name: 'Correlation',
                                data: [
                                    {% for metric_name1, metric_name2, result in metric_tuple %}
                                        {% if result|is_numeric %}
                                            {
                                                y: {{ result }},
                                                color: {% if result > 0 %}'#7cb5ec'{% else %}'#F16565'{% endif %}
                                            },
                                        {% else %}
                                            0,
                                        {% endif %}
                                    {% endfor %}
                                ]
                            }
                        ]
                    });
                });
            </script>
        {% endfor %}
    </div>
{% endblock %}

{'fraction_non_alphanumeric': 0.11258973909998249, 'fraction_numerical': 0.006303624584135878, 'mean_word_length': 0.7483930211202938, 'pattern_counts': {'":': 0, '<': 31, '<?xml version=': 0, '>': 33, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 42, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5563618', 'n_tokens_mistral': 1297, 'n_tokens_neox': 1125, 'n_words': 225}