<commit_before>import {
    _,
    Component,
    PostConstruct
} from "ag-grid-community";

import { ChartController } from "../../chartController";

export class MiniChartsContainer extends Component {
    static TEMPLATE = '<div class="ag-chart-settings-mini-wrapper"></div>';

    private readonly fills: string[];
    private readonly strokes: string[];
    private wrappers: HTMLElement[] = [];
    private chartController: ChartController;

    constructor(activePalette: number, chartController: ChartController) {
        super(MiniChartsContainer.TEMPLATE);

        const palettes = chartController.getPalettes();
        this.fills = palettes[activePalette].fills;
        this.strokes = palettes[activePalette].strokes;

        this.chartController = chartController;
    }

    @PostConstruct
    private init() {
        const classes = [MiniBar, MiniStackedBar, MiniNormalizedBar, MiniLine, MiniScatter, MiniPie, MiniDonut];
        const eGui = this.getGui();
        classes.forEach((MiniClass: new (parent: HTMLElement, fills: string[], strokes: string[]) => MiniChart, idx: number) => {
            const miniWrapper = document.createElement('div');
            _.addCssClass(miniWrapper, 'ag-chart-mini-thumbnail');

            this.addDestroyableEventListener(miniWrapper, 'click', () => {
                this.chartController.setChartType(idx);
                this.refreshSelected();
            });<commit_msg>AG-3067 - removed scatter mini chart from settings panel<commit_after>import {
    _,
    Component,
    PostConstruct
} from "ag-grid-community";

import { ChartController } from "../../chartController";

export class MiniChartsContainer extends Component {
    static TEMPLATE = '<div class="ag-chart-settings-mini-wrapper"></div>';

    private readonly fills: string[];
    private readonly strokes: string[];
    private wrappers: HTMLElement[] = [];
    private chartController: ChartController;

    constructor(activePalette: number, chartController: ChartController) {
        super(MiniChartsContainer.TEMPLATE);

        const palettes = chartController.getPalettes();
        this.fills = palettes[activePalette].fills;
        this.strokes = palettes[activePalette].strokes;

        this.chartController = chartController;
    }

    @PostConstruct
    private init() {
        // TODO: reintroduce MiniScatter when chart ranges support it
        // const classes = [MiniBar, MiniStackedBar, MiniNormalizedBar, MiniLine, MiniScatter, MiniPie, MiniDonut];
        const classes = [MiniBar, MiniStackedBar, MiniNormalizedBar, MiniLine, MiniPie, MiniDonut];
        const eGui = this.getGui();
        classes.forEach((MiniClass: new (parent: HTMLElement, fills: string[], strokes: string[]) => MiniChart, idx: number) => {
            const miniWrapper = document.createElement('div');
            _.addCssClass(miniWrapper, 'ag-chart-mini-thumbnail');

            this.addDestroyableEventListener(miniWrapper, 'click', () => {
                this.chartController.setChartType(idx);
                this.refreshSelected();
            });
{'fraction_non_alphanumeric': 0.11521035598705502, 'fraction_numerical': 0.0012944983818770227, 'mean_word_length': 3.2693370165745854, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 13, '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': '6277105', 'n_tokens_mistral': 847, 'n_tokens_neox': 811, 'n_words': 185}