<commit_before>"use strict";

class G2ChartElement extends HTMLElement {
    static get observedAttributes() {
        return [
            'width',
            'height',
            'xmin',
            'xmax',
            'ymin',
            'ymax',
            'title'
        ];
    }

    constructor() {
        super();
        this._root = this.attachShadow({ mode: 'open' });
    }

    get width() { return +this.getAttribute('width') || 301; }
    set width(q) { q && this.setAttribute('width', q)}
    get xmin() {return +this.getAttribute('xmin') || 0; }
    get xmax() {return +this.getAttribute('xmax') || 0; }
    get ymin() {return +this.getAttribute('ymin') || 0; }
    get ymax() {return +this.getAttribute('ymax') || 0; }
    get title() {return this.getAttribute('title') || ''; }
    get height() { return +this.getAttribute('height') || 201; }
    set height(q) { q && this.setAttribute('height', q)}

    connectedCallback() {
        this._root.innerHTML = G2ChartElement.template({
            width: this.width, height: this.height });
<commit_msg>Add ref to G2ChartElement attributes<commit_after>"use strict";

class G2ChartElement extends HTMLElement {
    static get observedAttributes() {
        return [
            'width',
            'height',
            'xmin',
            'xmax',
            'ymin',
            'ymax',
            'title',
            'ref'
        ];
    }

    constructor() {
        super();
        this._root = this.attachShadow({ mode: 'open' });
    }

    get width() { return +this.getAttribute('width') || 301; }
    set width(q) { q && this.setAttribute('width', q) }
    get height() { return +this.getAttribute('height') || 201; }
    set height(q) { q && this.setAttribute('height', q) }
    get xmin() {return +this.getAttribute('xmin') || 0; }

    get xmax() {return +this.getAttribute('xmax') || 0; }
    
    get ymin() {return +this.getAttribute('ymin') || 0; }
    
    get ymax() {return +this.getAttribute('ymax') || 0; }
    
    get title() {return this.getAttribute('title') || ''; }
    
    get ref() { return this.getAttribute('ref') }
    set ref(q) { return q &&  this.setAttribute('ref', q) }

    connectedCallback() {
        this._root.innerHTML = G2ChartElement.template({
            width: this.width, height: this.height });

{'fraction_non_alphanumeric': 0.16960826517434352, 'fraction_numerical': 0.01076194575979337, 'mean_word_length': 2.2964539007092197, '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': '7425833', 'n_tokens_mistral': 711, 'n_tokens_neox': 705, 'n_words': 163}