/**
 * pacem v0.51.10-faraday (https://js.pacem.it)
 * Copyright 2025 Pacem (https://pacem.it)
 * Licensed under Apache-2.0
 */
declare namespace Pacem.Components.Charts {
    const MANAGED_EVENTS: string[];
    interface ChartDataItem {
        label: any;
        value: number;
    }
    interface ChartDataSeries {
        readonly values: ChartDataItem[];
        readonly label: any;
        readonly color?: string;
        readonly className?: string;
        readonly datapoints?: boolean;
    }
    type ChartDatasource = ChartDataSeries[];
    type ChartDataSeriesItem = {
        series: any;
        label: any;
        color: string;
        value: number;
    };
    interface ChartEventArgs {
        readonly dataItem: ChartDataSeriesItem;
        readonly anchorPoint: Point;
    }
    class ChartEvent extends CustomUIEvent<ChartEventArgs> {
        constructor(type: string, eventInit: CustomEventInit<ChartEventArgs>, originalEvent: MouseEvent | TouchEvent | KeyboardEvent);
    }
    class PacemChartSeriesElement extends PacemItemElement implements ChartDataSeries {
        /** Gets or sets the - already sorted - set of chart data items. */
        datasource: ChartDataItem[];
        /** Gets or sets the series label. */
        label: string;
        color: string;
        datapoints: boolean;
        get values(): ChartDataItem[];
        /** @internal
         *  The elements that visually 'reflect' each ChartDataItem. */
        _uiElements: Element[];
    }
    abstract class PacemSeriesChartElement extends PacemItemsContainerElement<PacemChartSeriesElement> {
        constructor();
        validate(item: PacemChartSeriesElement): boolean;
        target: HTMLElement;
        /**
         Gets or sets the x-axis type for sorting, measuring and labeling.
         */
        xAxisType: 'string' | 'date' | 'number';
        xAxisPosition: 'bottom' | 'top' | 'none';
        datasource: ChartDatasource;
        /** Maximum number of horizontal grid lines. */
        yAxisDensity: number;
        /** Maximum number of x-axis labels. */
        xAxisDensity: number;
        /** Minimum y value. */
        yAxisMin: number;
        /** Maximum y value. */
        yAxisMax: number;
        yAxisFormat: Intl.NumberFormatOptions;
        xAxisFormat: Intl.NumberFormatOptions | Intl.DateTimeFormatOptions;
        register(item: PacemChartSeriesElement): boolean;
        unregister(item: PacemChartSeriesElement): boolean;
        private _itemPropertyChangedCallback;
        propertyChangedCallback(name: string, old: any, val: any, first?: boolean): void;
        private _handle;
        private _databindAndDrawDebounced;
        private _databind;
        private _key;
        private _mask;
        private _body;
        private _div;
        private _datasource;
        private _grid;
        private _series;
        private _resizer;
        private _size;
        disconnectedCallback(): void;
        viewActivatedCallback(): void;
        private _ensureResizer;
        private _resizeHandler;
        protected get chartSize(): Size;
        protected get chartSeries(): SVGSVGElement[];
        protected get chartBody(): SVGSVGElement;
        protected get chartGrid(): SVGSVGElement;
        protected get chartMask(): SVGMaskElement;
        protected get chartKey(): string;
        protected get chartContainer(): HTMLElement;
        private _broadcastHandler;
        protected assignUiBehaviors(ui: Element, series: ChartDataSeries, data: ChartDataItem, color?: string): void;
        protected disposeUiBehaviors(ui: Element): void;
        protected ensureChartContainer(): HTMLElement;
        protected ensureChartBody(type: string, w?: number, h?: number): SVGSVGElement;
        protected chartDataItemToPoint(input: ChartDataItem, source: ChartDataItem[]): Point;
        protected getVirtualGrid(items: ChartDataItem[], minX: number, maxX: number, minY: number, maxY: number, xAxisType?: "string" | "number" | "date", steps?: number, labels?: number): {
            x: string[];
            y: number[];
        };
        protected wipeOut(series?: SVGSVGElement[], startIndex?: number): void;
        protected buildLinearGradient(seriesIndex: number, invert?: boolean): SVGLinearGradientElement;
        protected setGradientColor(grad: SVGLinearGradientElement, color: string): void;
        protected estimateYAxisLabelWidth(max: number): number;
        protected estimateLabelWidth(txt: string): number;
        protected formatYAxisLabel(y: number): string;
        protected estimateXAxisLabelWidth(max: number | Date | string): number;
        protected formatXAxisLabel(x: number | Date | string): string;
        draw(): void;
        protected abstract drawSeries(datasource: ChartDatasource): any;
        /**
         * Default implementation.
         * @param element
         */
        getAnchorPoint(element: Element): Point;
    }
}
declare namespace Pacem.Components.Charts {
    class PacemColumnChartElement extends PacemSeriesChartElement {
        type: 'cluster' | 'stack';
        /** Set a value between 0 and 1, for the columns' stack/cluster horizontal size (percentage of the available space). */
        groupWidth: number;
        propertyChangedCallback(name: string, old: any, val: any, first?: boolean): void;
        private _safen;
        drawSeries(datasource: ChartDatasource): void;
    }
}
declare namespace Pacem.Components.Charts {
    class PacemChartElement extends PacemSeriesChartElement {
        #private;
        type: 'line' | 'spline' | 'area' | 'splinearea';
        /** Gets or sets how aspect ratio between x- and y-axis must be handled (considered only when xAxisType is `numeric`). Default is `adapt`.  */
        aspectRatio: 'adapt' | 'monometric' | 'logaritmic';
        private _getVirtualGrid;
        private _wipe;
        viewActivatedCallback(): void;
        disconnectedCallback(): void;
        propertyChangedCallback(name: string, old: any, val: any, first?: boolean): void;
        private _setupBehavior;
        private _dismantleBehavior;
        private _enterHandler;
        private _leaveHandler;
        private _moveHandler;
        private _chartFillSeries;
        private _buildLinearGradient;
        private _setGradientColor;
        protected drawSeries(datasource: ChartDatasource): void;
    }
}
declare namespace Pacem.Components.Charts {
    class PacemPieSliceElement extends PacemItemElement implements ChartDataItem {
        protected findContainer(): PacemPieChartElement;
        private get chart();
        value: number;
        label: string;
        color: string;
        normalizedPolarCoords: {
            radius: number;
            angle: number;
        };
        /** Returns the center of mass (point) of this pie/doughnut slice, in absolute coords (pixels). */
        getCenterOfMass(): Point;
        propertyChangedCallback(name: string, old: any, val: any, first?: boolean): void;
        private _ui;
        /** @internal */
        _assignUi(el: Element): void;
        /** @internal */
        _disposeUi(): void;
        private _broadcastHandler;
    }
    class PacemPieChartElement extends PacemItemsContainerElement<PacemPieSliceElement> {
        constructor();
        validate(item: PacemPieSliceElement): boolean;
        viewActivatedCallback(): void;
        propertyChangedCallback(name: string, old: any, val: any, first?: boolean): void;
        /** Set a value between 0 and 1, for doughnut appearance. */
        cutout: number;
        target: HTMLElement;
        maskBasedRendering: boolean;
        /** Distance between two consecutive slices, in pixels. */
        slicePadding: number;
        get area(): SVGSVGElement;
        private _key;
        private _svg;
        private _mask;
        private _g;
        private _div;
        disconnectedCallback(): void;
        private _ensureArea;
        private get _sliceMaskId();
        private get _safeCutout();
        private get _safeSlicePaddingPixels();
        private _drawSlice;
        private _isSliceOk;
        private _padSlice;
        private _slices;
        draw(): void;
    }
}
