code:
import type { Point } from '../types/geometric.js';
/**
 * @alias Chart.helpers.math
 * @namespace
 */
export declare const PI: number;
export declare const TAU: number;
export declare const PITAU: number;
export declare const INFINITY: number;
export declare const RAD_PER_DEG: number;
export declare const HALF_PI: number;
export declare const QUARTER_PI: number;
export declare const TWO_THIRDS_PI: number;
export declare const log10: (x: number) => number;
export declare const sign: (x: number) => number;
export declare function almostEquals(x: number, y: number, epsilon: number): boolean;
/**
 * Implementation of the nice number algorithm used in determining where axis labels will go
 */
export declare function niceNum(range: number): number;
/**
 * Returns an array of factors sorted from 1 to sqrt(value)
 * @private
 */
export declare function _factorize(value: number): number[];
export declare function isNumber(n: unknown): n is number;
export declare function almostWhole(x: number, epsilon: number): boolean;
/**
 * @private
 */
export declare function _setMinAndMaxByKey(array: Record<string, number>[], target: {
    min: number;
    max: number;
}, property: string): void;
export declare function toRadians(degrees: number): number;
export declare function toDegrees(radians: number): number;
/**
 * Returns the number of decimal places
 * i.e. the number of digits after the decimal point, of the value of this Number.
 * @param x - A number.
 * @returns The number of decimal places.
 * @private
 */
export declare function _decimalPlaces(x: number): number;
export declare function getAngleFromPoint(centrePoint: Point, anglePoint: Point): {
    angle: number;
    distance: number;
};
export declare function distanceBetweenPoints(pt1: Point, pt2: Point): number;
/**
 * Shortest distance between angles, in either direction.
 * @private
 */
export declare function _angleDiff(a: number, b: number): number;
/**
 * Normalize angle to be between 0 and 2*PI
 * @private
 */
export declare function _normalizeAngle(a: number): number;
/**
 * @private
 */
export declare function _angleBetween(angle: number, start: number, end: number, sameAngleIsFullCircle?: boolean): boolean;
/**
 * Limit `value` between `min` and `max`
 * @param value
 * @param min
 * @param max
 * @private
 */
export declare function _limitValue(value: number, min: number, max: number): number;
/**
 * @param {number} value
 * @private
 */
export declare function _int16Range(value: number): number;
/**
 * @param value
 * @param start
 * @param end
 * @param [epsilon]
 * @private
 */
export declare function _isBetween(value: number, start: number, end: number, epsilon?: number): boolean;


code:
import type { ChartArea, FontSpec, Point } from '../types/index.js';
import type { TRBL, TRBLCorners } from '../types/geometric.js';
/**
 * @alias Chart.helpers.options
 * @namespace
 */
/**
 * Converts the given line height `value` in pixels for a specific font `size`.
 * @param value - The lineHeight to parse (eg. 1.6, '14px', '75%', '1.6em').
 * @param size - The font size (in pixels) used to resolve relative `value`.
 * @returns The effective line height in pixels (size * 1.2 if value is invalid).
 * @see https://developer.mozilla.org/en-US/docs/Web/CSS/line-height
 * @since 2.7.0
 */
export declare function toLineHeight(value: number | string, size: number): number;
/**
 * @param value
 * @param props
 */
export declare function _readValueToProps<K extends string>(value: number | Record<K, number>, props: K[]): Record<K, number>;
export declare function _readValueToProps<K extends string, T extends string>(value: number | Record<K & T, number>, props: Record<T, K>): Record<T, number>;
/**
 * Converts the given value into a TRBL object.
 * @param value - If a number, set the value to all TRBL component,
 *  else, if an object, use defined properties and sets undefined ones to 0.
 *  x / y are shorthands for same value for left/right and top/bottom.
 * @returns The padding values (top, right, bottom, left)
 * @since 3.0.0
 */
export declare function toTRBL(value: number | TRBL | Point): Record<"left" | "top" | "bottom" | "right", number>;
/**
 * Converts the given value into a TRBL corners object (similar with css border-radius).
 * @param value - If a number, set the value to all TRBL corner components,
 *  else, if an object, use defined properties and sets undefined ones to 0.
 * @returns The TRBL corner values (topLeft, topRight, bottomLeft, bottomRight)
 * @since 3.0.0
 */
export declare function toTRBLCorners(value: number | TRBLCorners): Record<"topLeft" | "topRight" | "bottomLeft" | "bottomRight", number>;
/**
 * Converts the given value into a padding object with pre-computed width/height.
 * @param value - If a number, set the value to all TRBL component,
 *  else, if an object, use defined properties and sets undefined ones to 0.
 *  x / y are shorthands for same value for left/right and top/bottom.
 * @returns The padding values (top, right, bottom, left, width, height)
 * @since 2.7.0
 */
export declare function toPadding(value?: number | TRBL): ChartArea;
/**
 * Parses font options and returns the font object.
 * @param options - A object that contains font options to be parsed.
 * @param fallback - A object that contains fallback font options.
 * @return The font object.
 * @private
 */
export declare function toFont(options: Partial<FontSpec>, fallback?: Partial<FontSpec>): {
    family: string;
    lineHeight: number;
    size: number;
    style: "normal" | "inherit" | "italic" | "oblique" | "initial";
    weight: number | "bold" | "normal" | "lighter" | "bolder";
    string: string;
};
/**
 * Evaluates the given `inputs` sequentially and returns the first defined value.
 * @param inputs - An array of values, falling back to the last value.
 * @param context - If defined and the current value is a function, the value
 * is called with `context` as first argument and the result becomes the new input.
 * @param index - If defined and the current value is an array, the value
 * at `index` become the new input.
 * @param info - object to return information about resolution in
 * @param info.cacheable - Will be set to `false` if option is not cacheable.
 * @since 2.7.0
 */
export declare function resolve(inputs: Array<unknown>, context?: object, index?: number, info?: {
    cacheable: boolean;
}): unknown;
/**
 * @param minmax
 * @param grace
 * @param beginAtZero
 * @private
 */
export declare function _addGrace(minmax: {
    min: number;
    max: number;
}, grace: number | string, beginAtZero: boolean): {
    min: number;
    max: number;
};
/**
 * Create a context inheriting parentContext
 * @param parentContext
 * @param context
 * @returns
 */
export declare function createContext<T extends object>(parentContext: null, context: T): T;
export declare function createContext<T extends object, P extends T>(parentContext: P, context: T): P & T;

license: mit


code:
export interface RTLAdapter {
    x(x: number): number;
    setWidth(w: number): void;
    textAlign(align: 'center' | 'left' | 'right'): 'center' | 'left' | 'right';
    xPlus(x: number, value: number): number;
    leftForLtr(x: number, itemWidth: number): number;
}
export declare function getRtlAdapter(rtl: boolean, rectX: number, width: number): RTLAdapter;
export declare function overrideTextDirection(ctx: CanvasRenderingContext2D, direction: 'ltr' | 'rtl'): void;
export declare function restoreTextDirection(ctx: CanvasRenderingContext2D, original?: [string, string]): void;


code:
/**
 * Returns the sub-segment(s) of a line segment that fall in the given bounds
 * @param {object} segment
 * @param {number} segment.start - start index of the segment, referring the points array
 * @param {number} segment.end - end index of the segment, referring the points array
 * @param {boolean} segment.loop - indicates that the segment is a loop
 * @param {object} [segment.style] - segment style
 * @param {PointElement[]} points - the points that this segment refers to
 * @param {object} [bounds]
 * @param {string} bounds.property - the property of a `PointElement` we are bounding. `x`, `y` or `angle`.
 * @param {number} bounds.start - start value of the property
 * @param {number} bounds.end - end value of the property
 * @private
 **/
export function _boundSegment(segment: {
    start: number;
    end: number;
    loop: boolean;
    style?: object;
}, points: PointElement[], bounds?: {
    property: string;
    start: number;
    end: number;
}): {
    start: number;
    end: number;
    loop: boolean;
    style?: object;
}[];
/**
 * Returns the segments of the line that are inside given bounds
 * @param {LineElement} line
 * @param {object} [bounds]
 * @param {string} bounds.property - the property we are bounding with. `x`, `y` or `angle`.
 * @param {number} bounds.start - start value of the `property`
 * @param {number} bounds.end - end value of the `property`
 * @private
 */
export function _boundSegments(line: LineElement, bounds?: {
    property: string;
    start: number;
    end: number;
}): {
    start: number;
    end: number;
    loop: boolean;
    style?: object;
}[];
/**
 * Compute the continuous segments that define the whole line
 * There can be skipped points within a segment, if spanGaps is true.
 * @param {LineElement} line
 * @param {object} [segmentOptions]
 * @return {Segment[]}
 * @private
 */
export function _computeSegments(line: LineElement, segmentOptions?: object): Segment[];
export type LineElement = import('../elements/element.line.js').default;
export type PointElement = import('../elements/element.point.js').default;
export type Segment = {
    start: number;
    end: number;
    loop: boolean;
    style?: any;
};


code:
export * from './helpers.color.js';
export * from './helpers.core.js';
export * from './helpers.canvas.js';
export * from './helpers.collection.js';
export * from './helpers.config.js';
export * from './helpers.curve.js';
export * from './helpers.dom.js';
export { default as easingEffects } from './helpers.easing.js';
export * from './helpers.extras.js';
export * from './helpers.interpolation.js';
export * from './helpers.intl.js';
export * from './helpers.options.js';
export * from './helpers.math.js';
export * from './helpers.rtl.js';
export * from './helpers.segment.js';


code:
export * from './controllers/index.js';
export * from './core/index.js';
export * from './elements/index.js';
export * from './platform/index.js';
export * from './plugins/index.js';
export * from './scales/index.js';
import * as controllers from './controllers/index.js';
import * as elements from './elements/index.js';
import * as plugins from './plugins/index.js';
import * as scales from './scales/index.js';
export { controllers, elements, plugins, scales, };
export declare const registerables: (typeof controllers | typeof elements | typeof plugins | typeof scales)[];


code:
/**
 * @namespace Chart
 */
import Chart from './core/core.controller.js';
export default Chart;


code:
export function _detectPlatform(canvas: any): typeof BasicPlatform | typeof DomPlatform;
import BasicPlatform from "./platform.basic.js";
import DomPlatform from "./platform.dom.js";
import BasePlatform from "./platform.base.js";
export { BasePlatform, BasicPlatform, DomPlatform };


code:
/**
 * @typedef { import('../core/core.controller.js').default } Chart
 */
/**
 * Abstract class that allows abstracting platform dependencies away from the chart.
 */
export default class BasePlatform {
    /**
       * Called at chart construction time, returns a context2d instance implementing
       * the [W3C Canvas 2D Context API standard]{@link https://www.w3.org/TR/2dcontext/}.
       * @param {HTMLCanvasElement} canvas - The canvas from which to acquire context (platform specific)
       * @param {number} [aspectRatio] - The chart options
       */
    acquireContext(canvas: HTMLCanvasElement, aspectRatio?: number): void;
    /**
       * Called at chart destruction time, releases any resources associated to the context
       * previously returned by the acquireContext() method.
       * @param {CanvasRenderingContext2D} context - The context2d instance
       * @returns {boolean} true if the method succeeded, else false
       */
    releaseContext(context: CanvasRenderingContext2D): boolean;
    /**
       * Registers the specified listener on the given chart.
       * @param {Chart} chart - Chart from which to listen for event
       * @param {string} type - The ({@link ChartEvent}) type to listen for
       * @param {function} listener - Receives a notification (an object that implements
       * the {@link ChartEvent} interface) when an event of the specified type occurs.
       */
    addEventListener(chart: Chart, type: string, listener: Function): void;
    /**
       * Removes the specified listener previously registered with addEventListener.
       * @param {Chart} chart - Chart from which to remove the listener
       * @param {string} type - The ({@link ChartEvent}) type to remove
       * @param {function} listener - The listener function to remove from the event target.
       */
    removeEventListener(chart: Chart, type: string, listener: Function): void;
    /**
       * @returns {number} the current devicePixelRatio of the device this platform is connected to.
       */
    getDevicePixelRatio(): number;
    /**
       * Returns the maximum size in pixels of given canvas element.
       * @param {HTMLCanvasElement} element
       * @param {number} [width] - content width of parent element
       * @param {number} [height] - content height of parent element
       * @param {number} [aspectRatio] - aspect ratio to maintain
       */
    getMaximumSize(element: HTMLCanvasElement, width?: number, height?: number, aspectRatio?: number): {
        width: number;
        height: number;
    };
    /**
       * @param {HTMLCanvasElement} canvas
       * @returns {boolean} true if the canvas is attached to the platform, false if not.
       */
    isAttached(canvas: HTMLCanvasElement): boolean;
    /**
     * Updates config with platform specific requirements
     * @param {import('../core/core.config.js').default} config
     */
    updateConfig(config: import('../core/core.config.js').default): void;
}
export type Chart = import('../core/core.controller.js').default;


code:
/**
 * Platform class for charts without access to the DOM or to many element properties
 * This platform is used by default for any chart passed an OffscreenCanvas.
 * @extends BasePlatform
 */
export default class BasicPlatform extends BasePlatform {
    acquireContext(item: any): any;
    updateConfig(config: any): void;
}
import BasePlatform from "./platform.base.js";


code:
/**
 * Platform class for charts that can access the DOM and global window/document properties
 * @extends BasePlatform
 */
export default class DomPlatform extends BasePlatform {
    /**
       * @param {HTMLCanvasElement} canvas
       * @param {number} [aspectRatio]
       * @return {CanvasRenderingContext2D|null}
       */
    acquireContext(canvas: HTMLCanvasElement, aspectRatio?: number): CanvasRenderingContext2D | null;
    /**
       * @param {Chart} chart
       * @param {string} type
       */
    removeEventListener(chart: Chart, type: string): void;
}
export type Chart = import('../core/core.controller.js').default;
import BasePlatform from "./platform.base.js";


code:
export { default as Colors } from "./plugin.colors.js";
export { default as Decimation } from "./plugin.decimation.js";
export { default as Filler } from "./plugin.filler/index.js";
export { default as Legend } from "./plugin.legend.js";
export { default as SubTitle } from "./plugin.subtitle.js";
export { default as Title } from "./plugin.title.js";
export { default as Tooltip } from "./plugin.tooltip.js";


code:
import type { Chart } from '../types.js';
export interface ColorsPluginOptions {
    enabled?: boolean;
    forceOverride?: boolean;
}
declare const _default: {
    id: string;
    defaults: ColorsPluginOptions;
    beforeLayout(chart: Chart, _args: any, options: ColorsPluginOptions): void;
};
export default _default;


code:
declare namespace _default {
    const id: string;
    namespace defaults {
        const algorithm: string;
        const enabled: boolean;
    }
    function beforeElementsUpdate(chart: any, args: any, options: any): void;
    function destroy(chart: any): void;
}
export default _default;


code: export function _drawfill(ctx: any, source: any, area: any): void;


code:
/**
 * @param {PointElement[] | { x: number; y: number; }} boundary
 * @param {LineElement} line
 * @return {LineElement?}
 */
export function _createBoundaryLine(boundary: PointElement[] | {
    x: number;
    y: number;
}, line: LineElement): LineElement | null;
export function _shouldApplyFill(source: any): boolean;
export type Chart = import('../../core/core.controller.js').default;
export type Scale = import('../../core/core.scale.js').default;
export type PointElement = import('../../elements/element.point.js').default;
import { LineElement } from "../../elements/index.js";


code:
/**
 * @typedef { import('../../core/core.scale.js').default } Scale
 * @typedef { import('../../elements/element.line.js').default } LineElement
 * @typedef { import('../../types/index.js').FillTarget } FillTarget
 * @typedef { import('../../types/index.js').ComplexFillTarget } ComplexFillTarget
 */
export function _resolveTarget(sources: any, index: any, propagate: any): any;
/**
 * @param {LineElement} line
 * @param {number} index
 * @param {number} count
 */
export function _decodeFill(line: LineElement, index: number, count: number): any;
/**
 * @param {FillTarget | ComplexFillTarget} fill
 * @param {Scale} scale
 * @returns {number | null}
 */
export function _getTargetPixel(fill: FillTarget | ComplexFillTarget, scale: Scale): number | null;
/**
 * @param {FillTarget | ComplexFillTarget} fill
 * @param {Scale} scale
 * @param {number} startValue
 * @returns {number | undefined}
 */
export function _getTargetValue(fill: FillTarget | ComplexFillTarget, scale: Scale, startValue: number): number | undefined;
export type Scale = import('../../core/core.scale.js').default;
export type LineElement = import('../../elements/element.line.js').default;
export type FillTarget = import('../../types/index.js').FillTarget;
export type ComplexFillTarget = import('../../types/index.js').ComplexFillTarget;


code:
export function _segments(line: any, target: any, property: any): ({
    source: any;
    target: {
        property: any;
        start: any;
        end: any;
    };
    start: any;
    end: any;
} | {
    source: {
        start: number;
        end: number;
        loop: boolean;
        style?: any;
    };
    target: {
        start: number;
        end: number;
        loop: boolean;
        style?: any;
    };
    start: {
        [x: number]: any;
    };
    end: {
        [x: number]: any;
    };
})[];
export function _getBounds(property: any, first: any, last: any, loop: any): {
    property: any;
    start: any;
    end: any;
};
export function _pointsFromSegments(boundary: any, line: any): any[];
export function _findSegmentEnd(start: any, end: any, points: any): any;


code:
/**
 * @typedef { import('../../core/core.controller.js').default } Chart
 * @typedef { import('../../core/core.scale.js').default } Scale
 * @typedef { import('../../elements/element.point.js').default } PointElement
 */
export function _getTarget(source: any): any;
export type Chart = import('../../core/core.controller.js').default;
export type Scale = import('../../core/core.scale.js').default;
export type PointElement = import('../../elements/element.point.js').default;


code:
/**
 * @param {{ chart: Chart; scale: Scale; index: number; line: LineElement; }} source
 * @return {LineElement}
 */
export function _buildStackLine(source: {
    chart: Chart;
    scale: Scale;
    index: number;
    line: LineElement;
}): LineElement;
export type Chart = import('../../core/core.controller.js').default;
export type Scale = import('../../core/core.scale.js').default;
export type PointElement = import('../../elements/element.point.js').default;
import { LineElement } from "../../elements/index.js";


code:
declare namespace _default {
    const id: string;
    function afterDatasetsUpdate(chart: any, _args: any, options: any): void;
    function beforeDraw(chart: any, _args: any, options: any): void;
    function beforeDatasetsDraw(chart: any, _args: any, options: any): void;
    function beforeDatasetDraw(chart: any, args: any, options: any): void;
    namespace defaults {
        const propagate: boolean;
        const drawTime: string;
    }
}
export default _default;


code:
export class simpleArc {
    constructor(opts: any);
    x: any;
    y: any;
    radius: any;
    pathSegment(ctx: any, bounds: any, opts: any): boolean;
    interpolate(point: any): {
        x: any;
        y: any;
        angle: any;
    };
}


code:
export class Legend extends Element<import("../types/basic.js").AnyObject, import("../types/basic.js").AnyObject> {
    /**
       * @param {{ ctx: any; options: any; chart: any; }} config
       */
    constructor(config: {
        ctx: any;
        options: any;
        chart: any;
    });
    _added: boolean;
    legendHitBoxes: any[];
    /**
         * @private
         */
    private _hoveredItem;
    doughnutMode: boolean;
    chart: any;
    options: any;
    ctx: any;
    legendItems: any;
    columnSizes: any[];
    lineWidths: number[];
    maxHeight: any;
    maxWidth: any;
    top: any;
    bottom: any;
    left: any;
    right: any;
    height: any;
    width: any;
    _margins: any;
    position: any;
    weight: any;
    fullSize: any;
    update(maxWidth: any, maxHeight: any, margins: any): void;
    setDimensions(): void;
    buildLabels(): void;
    fit(): void;
    /**
       * @private
       */
    private _fitRows;
    _fitCols(titleHeight: any, labelFont: any, boxWidth: any, _itemHeight: any): any;
    adjustHitBoxes(): void;
    isHorizontal(): boolean;
    draw(): void;
    /**
       * @private
       */
    private _draw;
    /**
       * @protected
       */
    protected drawTitle(): void;
    /**
       * @private
       */
    private _computeTitleHeight;
    /**
       * @private
       */
    private _getLegendItemAt;
    /**
       * Handle an event
       * @param {ChartEvent} e - The event to handle
       */
    handleEvent(e: ChartEvent): void;
}
declare namespace _default {
    export const id: string;
    export { Legend as _element };
    export function start(chart: any, _args: any, options: any): void;
    export function stop(chart: any): void;
    export function beforeUpdate(chart: any, _args: any, options: any): void;
    export function afterUpdate(chart: any): void;
    export function afterEvent(chart: any, args: any): void;
    export namespace defaults {
        const display: boolean;
        const position: string;
        const align: string;
        const fullSize: boolean;
        const reverse: boolean;
        const weight: number;
        function onClick(e: any, legendItem: any, legend: any): void;
        const onHover: any;
        const onLeave: any;
        namespace labels {
            function color(ctx: any): any;
            const boxWidth: number;
            const padding: number;
            function generateLabels(chart: any): any;
        }
        namespace title {
            export function color_1(ctx: any): any;
            export { color_1 as color };
            const display_1: boolean;
            export { display_1 as display };
            const position_1: string;
            export { position_1 as position };
            export const text: string;
        }
    }
    export namespace descriptors {
        export function _scriptable(name: any): boolean;
        export namespace labels_1 {
            export function _scriptable_1(name: any): boolean;
            export { _scriptable_1 as _scriptable };
        }
        export { labels_1 as labels };
    }
}
export default _default;
export type ChartEvent = import('../types/index.js').ChartEvent;
import Element from "../core/core.element.js";


code:
declare namespace _default {
    const id: string;
    function start(chart: any, _args: any, options: any): void;
    function stop(chart: any): void;
    function beforeUpdate(chart: any, _args: any, options: any): void;
    namespace defaults {
        export const align: string;
        export const display: boolean;
        export namespace font {
            const weight: string;
        }
        export const fullSize: boolean;
        export const padding: number;
        export const position: string;
        export const text: string;
        const weight_1: number;
        export { weight_1 as weight };
    }
    namespace defaultRoutes {
        const color: string;
    }
    namespace descriptors {
        const _scriptable: boolean;
        const _indexable: boolean;
    }
}
export default _default;


code:
export class Title extends Element<import("../types/basic.js").AnyObject, import("../types/basic.js").AnyObject> {
    /**
       * @param {{ ctx: any; options: any; chart: any; }} config
       */
    constructor(config: {
        ctx: any;
        options: any;
        chart: any;
    });
    chart: any;
    options: any;
    ctx: any;
    _padding: import("../types.js").ChartArea;
    top: number;
    bottom: any;
    left: number;
    right: any;
    width: any;
    height: any;
    position: any;
    weight: any;
    fullSize: any;
    update(maxWidth: any, maxHeight: any): void;
    isHorizontal(): boolean;
    _drawArgs(offset: any): {
        titleX: any;
        titleY: any;
        maxWidth: number;
        rotation: number;
    };
    draw(): void;
}
declare namespace _default {
    export const id: string;
    export { Title as _element };
    export function start(chart: any, _args: any, options: any): void;
    export function stop(chart: any): void;
    export function beforeUpdate(chart: any, _args: any, options: any): void;
    export namespace defaults {
        export const align: string;
        export const display: boolean;
        export namespace font {
            const weight: string;
        }
        export const fullSize: boolean;
        export const padding: number;
        export const position: string;
        export const text: string;
        const weight_1: number;
        export { weight_1 as weight };
    }
    export namespace defaultRoutes {
        const color: string;
    }
    export namespace descriptors {
        const _scriptable: boolean;
        const _indexable: boolean;
    }
}
export default _default;
import Element from "../core/core.element.js";


code:
export class Tooltip extends Element<import("../types/basic.js").AnyObject, import("../types/basic.js").AnyObject> {
    /**
     * @namespace Chart.Tooltip.positioners
     */
    static positioners: {
        /**
           * Average mode places the tooltip at the average position of the elements shown
           */
        average(items: any): false | {
            x: number;
            y: number;
        };
        /**
           * Gets the tooltip position nearest of the item nearest to the event position
           */
        nearest(items: any, eventPosition: any): false | {
            x: any;
            y: any;
        };
    };
    constructor(config: any);
    opacity: number;
    _active: any[];
    _eventPosition: any;
    _size: {
        width: number;
        height: number;
    };
    _cachedAnimations: Readonly<Animations>;
    _tooltipItems: any[];
    $animations: any;
    $context: any;
    chart: any;
    options: any;
    dataPoints: {
        chart: import("../core/core.controller.js").default;
        label: any;
        parsed: any;
        raw: any;
        formattedValue: any;
        dataset: any;
        dataIndex: number;
        datasetIndex: number;
        element: Element<import("../types/basic.js").AnyObject, import("../types/basic.js").AnyObject>;
    }[];
    title: any;
    beforeBody: any;
    body: any[];
    afterBody: any;
    footer: any;
    xAlign: any;
    yAlign: any;
    x: any;
    y: any;
    height: number;
    width: number;
    caretX: any;
    caretY: any;
    labelColors: any[];
    labelPointStyles: any[];
    labelTextColors: any[];
    initialize(options: any): void;
    /**
       * @private
       */
    private _resolveAnimations;
    /**
       * @protected
       */
    protected getContext(): any;
    getTitle(context: any, options: any): any;
    getBeforeBody(tooltipItems: any, options: any): any;
    getBody(tooltipItems: any, options: any): any[];
    getAfterBody(tooltipItems: any, options: any): any;
    getFooter(tooltipItems: any, options: any): any;
    /**
       * @private
       */
    private _createItems;
    update(changed: any, replay: any): void;
    drawCaret(tooltipPoint: any, ctx: any, size: any, options: any): void;
    getCaretPosition(tooltipPoint: any, size: any, options: any): {
        x1: any;
        x2: any;
        x3: any;
        y1: any;
        y2: any;
        y3: any;
    };
    drawTitle(pt: any, ctx: any, options: any): void;
    /**
       * @private
       */
    private _drawColorBox;
    drawBody(pt: any, ctx: any, options: any): void;
    drawFooter(pt: any, ctx: any, options: any): void;
    drawBackground(pt: any, ctx: any, tooltipSize: any, options: any): void;
    /**
       * Update x/y animation targets when _active elements are animating too
       * @private
       */
    private _updateAnimationTarget;
    /**
     * Determine if the tooltip will draw anything
     * @returns {boolean} True if the tooltip will render
     */
    _willRender(): boolean;
    draw(ctx: any): void;
    /**
       * Get active elements in the tooltip
       * @returns {Array} Array of elements that are active in the tooltip
       */
    getActiveElements(): any[];
    /**
       * Set active elements in the tooltip
       * @param {array} activeElements Array of active datasetIndex/index pairs.
       * @param {object} eventPosition Synthetic event position used in positioning
       */
    setActiveElements(activeElements: any[], eventPosition: object): void;
    _ignoreReplayEvents: boolean;
    /**
       * Handle an event
       * @param {ChartEvent} e - The event to handle
       * @param {boolean} [replay] - This is a replayed event (from update)
       * @param {boolean} [inChartArea] - The event is inside chartArea
       * @returns {boolean} true if the tooltip changed
       */
    handleEvent(e: ChartEvent, replay?: boolean, inChartArea?: boolean): boolean;
    /**
       * Helper for determining the active elements for event
       * @param {ChartEvent} e - The event to handle
       * @param {InteractionItem[]} lastActive - Previously active elements
       * @param {boolean} [replay] - This is a replayed event (from update)
       * @param {boolean} [inChartArea] - The event is inside chartArea
       * @returns {InteractionItem[]} - Active elements
       * @private
       */
    private _getActiveElements;
    /**
       * Determine if the active elements + event combination changes the
       * tooltip position
       * @param {array} active - Active elements
       * @param {ChartEvent} e - Event that triggered the position change
       * @returns {boolean} True if the position has changed
       */
    _positionChanged(active: any[], e: ChartEvent): boolean;
}
declare namespace _default {
    export const id: string;
    export { Tooltip as _element };
    export { positioners };
    export function afterInit(chart: any, _args: any, options: any): void;
    export function beforeUpdate(chart: any, _args: any, options: any): void;
    export function reset(chart: any, _args: any, options: any): void;
    export function afterDraw(chart: any): void;
    export function afterEvent(chart: any, args: any): void;
    export namespace defaults {
        export const enabled: boolean;
        export const external: any;
        export const position: string;
        export const backgroundColor: string;
        export const titleColor: string;
        export namespace titleFont {
            const weight: string;
        }
        export const titleSpacing: number;
        export const titleMarginBottom: number;
        export const titleAlign: string;
        export const bodyColor: string;
        export const bodySpacing: number;
        export const bodyFont: {};
        export const bodyAlign: string;
        export const footerColor: string;
        export const footerSpacing: number;
        export const footerMarginTop: number;
        export namespace footerFont {
            const weight_1: string;
            export { weight_1 as weight };
        }
        export const footerAlign: string;
        export const padding: number;
        export const caretPadding: number;
        export const caretSize: number;
        export const cornerRadius: number;
        export function boxHeight(ctx: any, opts: any): any;
        export function boxWidth(ctx: any, opts: any): any;
        export const multiKeyBackground: string;
        export const displayColors: boolean;
        export const boxPadding: number;
        export const borderColor: string;
        export const borderWidth: number;
        export namespace animation {
            const duration: number;
            const easing: string;
        }
        export namespace animations {
            namespace numbers {
                const type: string;
                const properties: string[];
            }
            namespace opacity {
                const easing_1: string;
                export { easing_1 as easing };
                const duration_1: number;
                export { duration_1 as duration };
            }
        }
        export { defaultCallbacks as callbacks };
    }
    export namespace defaultRoutes {
        const bodyFont_1: string;
        export { bodyFont_1 as bodyFont };
        const footerFont_1: string;
        export { footerFont_1 as footerFont };
        const titleFont_1: string;
        export { titleFont_1 as titleFont };
    }
    export namespace descriptors {
        export function _scriptable(name: any): boolean;
        export const _indexable: boolean;
        export namespace callbacks {
            const _scriptable_1: boolean;
            export { _scriptable_1 as _scriptable };
            const _indexable_1: boolean;
            export { _indexable_1 as _indexable };
        }
        export namespace animation_1 {
            const _fallback: boolean;
        }
        export { animation_1 as animation };
        export namespace animations_1 {
            const _fallback_1: string;
            export { _fallback_1 as _fallback };
        }
        export { animations_1 as animations };
    }
    export const additionalOptionScopes: string[];
}
export default _default;
export type Chart = import('../platform/platform.base.js').Chart;
export type ChartEvent = import('../types/index.js').ChartEvent;
export type ActiveElement = import('../types/index.js').ActiveElement;
export type InteractionItem = import('../core/core.interaction.js').InteractionItem;
import Element from "../core/core.element.js";
import Animations from "../core/core.animations.js";
declare namespace positioners {
    /**
       * Average mode places the tooltip at the average position of the elements shown
       */
    function average(items: any): false | {
        x: number;
        y: number;
    };
    /**
       * Gets the tooltip position nearest of the item nearest to the event position
       */
    function nearest(items: any, eventPosition: any): false | {
        x: any;
        y: any;
    };
}
declare namespace defaultCallbacks {
    export { noop as beforeTitle };
    export function title(tooltipItems: any): any;
    export { noop as afterTitle };
    export { noop as beforeBody };
    export { noop as beforeLabel };
    export function label(tooltipItem: any): any;
    export function labelColor(tooltipItem: any): {
        borderColor: any;
        backgroundColor: any;
        borderWidth: any;
        borderDash: any;
        borderDashOffset: any;
        borderRadius: number;
    };
    export function labelTextColor(): any;
    export function labelPointStyle(tooltipItem: any): {
        pointStyle: any;
        rotation: any;
    };
    export { noop as afterLabel };
    export { noop as afterBody };
    export { noop as beforeFooter };
    export { noop as footer };
    export { noop as afterFooter };
}
import { noop } from "../helpers/helpers.core.js";


code:
export { default as CategoryScale } from "./scale.category.js";
export { default as LinearScale } from "./scale.linear.js";
export { default as LogarithmicScale } from "./scale.logarithmic.js";
export { default as RadialLinearScale } from "./scale.radialLinear.js";
export { default as TimeScale } from "./scale.time.js";
export { default as TimeSeriesScale } from "./scale.timeseries.js";


code:
export default class CategoryScale extends Scale {
    static id: string;
    /**
     * @type {any}
     */
    static defaults: any;
    /** @type {number} */
    _startValue: number;
    _valueRange: number;
    _addedLabels: any[];
    init(scaleOptions: any): void;
    parse(raw: any, index: any): number;
    buildTicks(): {
        value: any;
    }[];
    getLabelForValue(value: any): any;
    getPixelForValue(value: any): number;
    getPixelForTick(index: any): number;
    getValueForPixel(pixel: any): number;
}
import Scale from "../core/core.scale.js";


code:
export default class LinearScale extends LinearScaleBase {
    static id: string;
    /**
     * @type {any}
     */
    static defaults: any;
    getPixelForValue(value: any): number;
    getValueForPixel(pixel: any): number;
}
import LinearScaleBase from "./scale.linearbase.js";


code:
export default class LinearScaleBase extends Scale {
    /** @type {number} */
    start: number;
    /** @type {number} */
    end: number;
    /** @type {number} */
    _startValue: number;
    /** @type {number} */
    _endValue: number;
    _valueRange: number;
    parse(raw: any, index: any): number;
    handleTickRangeOptions(): void;
    getTickLimit(): number;
    /**
       * @protected
       */
    protected computeTickLimit(): number;
    getLabelForValue(value: any): string;
}
import Scale from "../core/core.scale.js";


code:
export default class LogarithmicScale extends Scale {
    static id: string;
    /**
     * @type {any}
     */
    static defaults: any;
    /** @type {number} */
    start: number;
    /** @type {number} */
    end: number;
    /** @type {number} */
    _startValue: number;
    _valueRange: number;
    parse(raw: any, index: any): number;
    _zero: boolean;
    handleTickRangeOptions(): void;
    /**
       * @param {number} value
       * @return {string}
       */
    getLabelForValue(value: number): string;
    getPixelForValue(value: any): number;
    getValueForPixel(pixel: any): number;
}
import Scale from "../core/core.scale.js";


code:
export default class RadialLinearScale extends LinearScaleBase {
    static id: string;
    /**
     * @type {any}
     */
    static defaults: any;
    static defaultRoutes: {
        'angleLines.color': string;
        'pointLabels.color': string;
        'ticks.color': string;
    };
    static descriptors: {
        angleLines: {
            _fallback: string;
        };
    };
    /** @type {number} */
    xCenter: number;
    /** @type {number} */
    yCenter: number;
    /** @type {number} */
    drawingArea: number;
    /** @type {string[]} */
    _pointLabels: string[];
    _pointLabelItems: any[];
    _padding: import("../types.js").ChartArea;
    generateTickLabels(ticks: any): void;
    setCenterPoint(leftMovement: any, rightMovement: any, topMovement: any, bottomMovement: any): void;
    getIndexAngle(index: any): number;
    getDistanceFromCenterForValue(value: any): number;
    getValueForDistanceFromCenter(distance: any): any;
    getPointLabelContext(index: any): any;
    getPointPosition(index: any, distanceFromCenter: any, additionalAngle?: number): {
        x: number;
        y: number;
        angle: number;
    };
    getPointPositionForValue(index: any, value: any): {
        x: number;
        y: number;
        angle: number;
    };
    getBasePosition(index: any): {
        x: number;
        y: number;
        angle: number;
    };
    getPointLabelPosition(index: any): {
        left: any;
        top: any;
        right: any;
        bottom: any;
    };
    /**
       * @protected
       */
    protected drawGrid(): void;
    /**
       * @protected
       */
    protected drawLabels(): void;
}
import LinearScaleBase from "./scale.linearbase.js";


code:
export default class TimeScale extends Scale {
    static id: string;
    /**
     * @type {any}
     */
    static defaults: any;
    /**
       * @param {object} props
       */
    constructor(props: object);
    /** @type {{data: number[], labels: number[], all: number[]}} */
    _cache: {
        data: number[];
        labels: number[];
        all: number[];
    };
    /** @type {Unit} */
    _unit: Unit;
    /** @type {Unit=} */
    _majorUnit: Unit | undefined;
    _offsets: {};
    _normalized: boolean;
    _parseOpts: {
        parser: any;
        round: any;
        isoWeekday: any;
    };
    init(scaleOpts: any, opts?: {}): void;
    _adapter: DateAdapter;
    /**
       * @param {*} raw
       * @param {number?} [index]
       * @return {number}
       */
    parse(raw: any, index?: number | null): number;
    /**
       * @private
       */
    private _getLabelBounds;
    /**
       * Returns the start and end offsets from edges in the form of {start, end}
       * where each value is a relative width to the scale and ranges between 0 and 1.
       * They add extra margins on the both sides by scaling down the original scale.
       * Offsets are added when the `offset` option is true.
       * @param {number[]} timestamps
       * @protected
       */
    protected initOffsets(timestamps?: number[]): void;
    /**
       * Generates a maximum of `capacity` timestamps between min and max, rounded to the
       * `minor` unit using the given scale time `options`.
       * Important: this method can return ticks outside the min and max range, it's the
       * responsibility of the calling code to clamp values if needed.
       * @protected
       */
    protected _generate(): number[];
    /**
       * @param {number} value
       * @return {string}
       */
    getLabelForValue(value: number): string;
    /**
       * @param {number} value
       * @param {string|undefined} format
       * @return {string}
       */
    format(value: number, format: string | undefined): string;
    /**
       * Function to format an individual tick mark
       * @param {number} time
       * @param {number} index
       * @param {object[]} ticks
       * @param {string|undefined} [format]
       * @return {string}
       * @private
       */
    private _tickFormatFunction;
    /**
       * @param {object[]} ticks
       */
    generateTickLabels(ticks: object[]): void;
    /**
       * @param {number} value - Milliseconds since epoch (1 January 1970 00:00:00 UTC)
       * @return {number}
       */
    getDecimalForValue(value: number): number;
    /**
       * @param {number} value - Milliseconds since epoch (1 January 1970 00:00:00 UTC)
       * @return {number}
       */
    getPixelForValue(value: number): number;
    /**
       * @param {number} pixel
       * @return {number}
       */
    getValueForPixel(pixel: number): number;
    /**
       * @param {string} label
       * @return {{w:number, h:number}}
       * @private
       */
    private _getLabelSize;
    /**
       * @param {number} exampleTime
       * @return {number}
       * @private
       */
    private _getLabelCapacity;
    /**
       * @protected
       */
    protected getDataTimestamps(): any;
    /**
       * @protected
       */
    protected getLabelTimestamps(): number[];
    /**
       * @param {number[]} values
       * @protected
       */
    protected normalize(values: number[]): number[];
}
export type Unit = import('../core/core.adapters.js').TimeUnit;
export type Interval = {
    common: boolean;
    size: number;
    steps?: number;
};
export type DateAdapter = import('../core/core.adapters.js').DateAdapter;
import Scale from "../core/core.scale.js";


code:
export default TimeSeriesScale;
declare class TimeSeriesScale extends TimeScale {
    /** @type {object[]} */
    _table: object[];
    /** @type {number} */
    _minPos: number;
    /** @type {number} */
    _tableRange: number;
    /**
       * @protected
       */
    protected initOffsets(): void;
    /**
       * Returns an array of {time, pos} objects used to interpolate a specific `time` or position
       * (`pos`) on the scale, by searching entries before and after the requested value. `pos` is
       * a decimal between 0 and 1: 0 being the start of the scale (left or top) and 1 the other
       * extremity (left + width or top + height). Note that it would be more optimized to directly
       * store pre-computed pixels, but the scale dimensions are not guaranteed at the time we need
       * to create the lookup table. The table ALWAYS contains at least two items: min and max.
       * @param {number[]} timestamps
       * @return {object[]}
       * @protected
       */
    protected buildLookupTable(timestamps: number[]): object[];
    /**
      * Generates all timestamps defined in the data.
      * Important: this method can return ticks outside the min and max range, it's the
      * responsibility of the calling code to clamp values if needed.
      * @protected
      */
    protected _generate(): any;
    /**
       * Returns all timestamps
       * @return {number[]}
       * @private
       */
    private _getTimestampsForTable;
}
import TimeScale from "./scale.time.js";


code:
/**
 * Temporary entry point of the types at the time of the transition.
 * After transition done need to remove it in favor of index.ts
 */
export * from './index.js';
/**
 * Explicitly re-exporting to resolve the ambiguity.
 */
export { BarController, BubbleController, DoughnutController, LineController, PieController, PolarAreaController, RadarController, ScatterController, Animation, Animations, Chart, DatasetController, Interaction, Scale, Ticks, defaults, layouts, registry, ArcElement, BarElement, LineElement, PointElement, BasePlatform, BasicPlatform, DomPlatform, Decimation, Filler, Legend, SubTitle, Title, Tooltip, CategoryScale, LinearScale, LogarithmicScale, RadialLinearScale, TimeScale, TimeSeriesScale, PluginOptionsByType, ElementOptionsByType, ChartDatasetProperties, UpdateModeEnum, registerables } from './types/index.js';
export * from './types/index.js';


code:
import {Chart} from './index.js';
import {AnyObject} from './basic.js';

export declare class Animation {
  constructor(cfg: AnyObject, target: AnyObject, prop: string, to?: unknown);
  active(): boolean;
  update(cfg: AnyObject, to: unknown, date: number): void;
  cancel(): void;
  tick(date: number): void;
  readonly _to: unknown;
}

export interface AnimationEvent {
  chart: Chart;
  numSteps: number;
  initial: boolean;
  currentStep: number;
}

export declare class Animator {
  listen(chart: Chart, event: 'complete' | 'progress', cb: (event: AnimationEvent) => void): void;
  add(chart: Chart, items: readonly Animation[]): void;
  has(chart: Chart): boolean;
  start(chart: Chart): void;
  running(chart: Chart): boolean;
  stop(chart: Chart): void;
  remove(chart: Chart): boolean;
}

export declare class Animations {
  constructor(chart: Chart, animations: AnyObject);
  configure(animations: AnyObject): void;
  update(target: AnyObject, values: AnyObject): undefined | boolean;
}


code:
export type AnyObject = Record<string, any>;
export type EmptyObject = Record<string, never>;


code: export type Color = string | CanvasGradient | CanvasPattern;


code:
export interface ChartArea {
  top: number;
  left: number;
  right: number;
  bottom: number;
  width: number;
  height: number;
}

export interface Point {
  x: number;
  y: number;
}

export type TRBL = {
  top: number;
  right: number;
  bottom: number;
  left: number;
}

export type TRBLCorners = {
  topLeft: number;
  topRight: number;
  bottomLeft: number;
  bottomRight: number;
};

export type CornerRadius = number | Partial<TRBLCorners>;

export type RoundedRect = {
  x: number;
  y: number;
  w: number;
  h: number;
  radius?: CornerRadius
}

export type Padding = Partial<TRBL> | number | Point;

export interface SplinePoint {
  x: number;
  y: number;
  skip?: boolean;

  // Both Bezier and monotone interpolations have these fields
  // but they are added in different spots
  cp1x?: number;
  cp1y?: number;
  cp2x?: number;
  cp2y?: number;
}