<commit_before><style lang="less">
.chart-legend {
    text-align: center;
    margin-top: 10px;

    ul {
        list-style: none;
        margin-bottom: 0;

        li {
            display: inline-block;
            margin-right: 5px;

            span {
                display: inline-block;
                width: 20px;
                height: 16px;
                margin-right: 5px;
                margin-left: 10px;
                border: 1px solid #999;
                vertical-align: middle;
            }
        }

    }
}
</style>

<template>
    <box title="{{title}}" icon="{{ icon || 'line-chart' }}"
        boxclass="box-solid"
        bodyclass="chart-responsive"
        loading="{{metrics.loading}}">
        <aside>
            <div class="btn-group" data-toggle="btn-toggle">
                <button type="button" class="btn btn-primary btn-xs"
                    v-repeat="types"
                    v-class="active: charttype == $key"
                    aria-pressed="{{charttype == $key}}"
                    v-on="click: charttype = $key"
                    >
                    <span class="fa fa-fw fa-{{$value}}"></span>
                </button>
            </div>
        </aside>
        <div class="chart" v-style="height: height" v-el="container">
            <canvas v-el="canvas" height="100%"></canvas>
        </div>
        <div class="chart-legend" v-el="legend"></div>
    </box>
</template>

<script>
'use strict';

var $ = require('jquery'),
    moment = require('moment'),
    debounce = require('debounce'),
    Chart = require('chart.js');

require('Chart.StackedBar.js');

/*
 * Set common global chart options
 */
Chart.defaults.global.showScale = true;
Chart.defaults.global.scaleLineColor = 'rgba(0,0,0,.05)';
Chart.defaults.global.scaleLineWidth = 1;
Chart.defaults.global.responsive = true;
Chart.defaults.global.maintainAspectRatio = false;<commit_msg>Fix chart widget transclusion handlers<commit_after><style lang="less">
.chart-legend {
    text-align: center;
    margin-top: 10px;

    ul {
        list-style: none;
        margin-bottom: 0;

        li {
            display: inline-block;
            margin-right: 5px;

            span {
                display: inline-block;
                width: 20px;
                height: 16px;
                margin-right: 5px;
                margin-left: 10px;
                border: 1px solid #999;
                vertical-align: middle;
            }
        }

    }
}
</style>

<template>
    <box title="{{title}}" icon="{{ icon || 'line-chart' }}"
        boxclass="box-solid"
        bodyclass="chart-responsive"
        loading="{{metrics.loading}}">
        <aside>
            <div class="btn-group" data-toggle="btn-toggle">
                <button type="button" class="btn btn-primary btn-xs"
                    v-repeat="types"
                    v-class="active: $parent.$parent.charttype == $key"
                    aria-pressed="{{$parent.$parent.charttype == $key}}"
                    v-on="click: $parent.$parent.charttype = $key"
                    >
                    <span class="fa fa-fw fa-{{$value}}"></span>
                </button>
            </div>
        </aside>
        <div class="chart" v-style="height: height" v-el="container">
            <canvas v-el="canvas" height="100%"></canvas>
        </div>
        <div class="chart-legend" v-el="legend"></div>
    </box>
</template>

<script>
'use strict';

var $ = require('jquery'),
    moment = require('moment'),
    debounce = require('debounce'),
    Chart = require('chart.js');

require('Chart.StackedBar.js');

/*
 * Set common global chart options
 */
Chart.defaults.global.showScale = true;
Chart.defaults.global.scaleLineColor = 'rgba(0,0,0,.05)';
Chart.defaults.global.scaleLineWidth = 1;
Chart.defaults.global.responsive = true;
Chart.defaults.global.maintainAspectRatio = false;
{'fraction_non_alphanumeric': 0.15620998719590268, 'fraction_numerical': 0.012291933418693982, 'mean_word_length': 1.8080517613227893, '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': '6516482', 'n_tokens_mistral': 1214, 'n_tokens_neox': 1119, 'n_words': 223}