<commit_before>import { ChartBuilder } from "../../builder/chartBuilder";
import { ChartType, DoughnutChartOptions, PieSeriesOptions } from "ag-grid-community";
import { ChartProxy, ChartProxyParams, UpdateChartParams } from "./chartProxy";
import { PolarChart } from "../../../charts/chart/polarChart";
import { PieSeries } from "../../../charts/chart/series/pieSeries";
import { CaptionOptions } from "ag-grid-community/src/ts/interfaces/iChartOptions";

export class DoughnutChartProxy extends ChartProxy {
    private readonly chartOptions: DoughnutChartOptions;

    public constructor(params: ChartProxyParams) {
        super(params);

        this.chartOptions = this.getChartOptions(ChartType.Doughnut, this.defaultOptions()) as DoughnutChartOptions;
        this.chart = ChartBuilder.createDoughnutChart(this.chartOptions);
    }

    public update(params: UpdateChartParams): void {
        debugger;
        if (params.fields.length === 0) {
            this.chart.removeAllSeries();
            return;
        }<commit_msg>Cleanup.<commit_after>import { ChartBuilder } from "../../builder/chartBuilder";
import { ChartType, DoughnutChartOptions, PieSeriesOptions } from "ag-grid-community";
import { ChartProxy, ChartProxyParams, UpdateChartParams } from "./chartProxy";
import { PolarChart } from "../../../charts/chart/polarChart";
import { PieSeries } from "../../../charts/chart/series/pieSeries";
import { CaptionOptions } from "ag-grid-community/src/ts/interfaces/iChartOptions";

export class DoughnutChartProxy extends ChartProxy {
    private readonly chartOptions: DoughnutChartOptions;

    public constructor(params: ChartProxyParams) {
        super(params);

        this.chartOptions = this.getChartOptions(ChartType.Doughnut, this.defaultOptions()) as DoughnutChartOptions;
        this.chart = ChartBuilder.createDoughnutChart(this.chartOptions);
    }

    public update(params: UpdateChartParams): void {
        if (params.fields.length === 0) {
            this.chart.removeAllSeries();
            return;
        }
{'fraction_non_alphanumeric': 0.12384202827888835, 'fraction_numerical': 0.0009751340809361287, 'mean_word_length': 3.717241379310345, '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': '380942', 'n_tokens_mistral': 559, 'n_tokens_neox': 539, 'n_words': 115}