Chart.js - v3.6.2

    Type parameters

    Type declaration

    NameType
    animationfalse | AnimationSpec<TType> & { onComplete?: (event: ) => void ; onProgress?: (event: AnimationEvent) => void }
    animations<TType>
    transitionsTransitionsSpec<TType>

    Defined in

    index.esm.d.ts:1598 (opens new window)


    AnimationSpec

    Ƭ AnimationSpec<TType>: Object

    Type parameters

    NameType
    TTypeextends

    Type declaration

    NameTypeDescription
    delay?<number, ScriptableContext<TType>>Delay before starting the animations. default 0
    duration?<number, ScriptableContext<TType>>The number of milliseconds an animation takes. default 1000
    easing?<EasingFunction, <TType>>Easing function to use default ‘easeOutQuart’
    loop?Scriptable<boolean, <TType>>If set to true, the animations loop endlessly. default false

    Defined in


    AnimationsSpec

    Ƭ AnimationsSpec<TType>: Object

    Type parameters

    NameType
    TTypeextends ChartType

    Index signature

    ▪ [name: string]: false | AnimationSpec<TType> & { from: <Color | number | boolean, <TType>> ; properties: string[] ; to: Scriptable< | number | boolean, ScriptableContext<TType>> ; type: "color" | "number" | "boolean" ; fn: <T>(from: T, to: T, factor: number) => T }

    Defined in

    index.esm.d.ts:1567 (opens new window)


    BarController

    Ƭ BarController: DatasetController

    Defined in

    index.esm.d.ts:142Exports - 图4 (opens new window)


    BubbleController

    Ƭ BubbleController: DatasetController

    Defined in

    index.esm.d.ts:170 (opens new window)


    CategoryScale

    Ƭ CategoryScale<O>: Scale<O>

    Type parameters

    NameType
    Oextends CategoryScaleOptions

    Defined in


    CategoryScaleOptions

    Ƭ CategoryScaleOptions: & { labels: string[] | string[][] ; max: string | number ; min: string | number }

    Defined in


    ChartComponentLike

    Ƭ ChartComponentLike: | ChartComponent[] | { [key: string]: ; } | Plugin | []

    Defined in


    ChartDataset

    Ƭ ChartDataset<TType, TData>: DeepPartial<{ [key in ChartType]: object & ChartTypeRegistry[key][“datasetOptions”]}[TType]> & <TType, TData>

    Type parameters

    NameType
    TTypeextends ChartType
    TData<TType>

    Defined in


    ChartItem

    Ƭ ChartItem: string | CanvasRenderingContext2D | HTMLCanvasElement | { canvas: HTMLCanvasElement } | ArrayLike<CanvasRenderingContext2D | HTMLCanvasElement>

    Defined in

    index.esm.d.ts:547Exports - 图10 (opens new window)


    ChartMeta

    Ƭ ChartMeta<TElement, TDatasetElement, TType>: DeepPartial<{ [key in ChartType]: ChartTypeRegistry[key][“metaExtensions”]}[TType]> & ChartMetaCommon<TElement, TDatasetElement>

    Type parameters

    NameType
    TElementextends Element
    TDatasetElementextends Element
    TTypeextends ChartType

    Defined in

    index.esm.d.ts:455 (opens new window)


    ChartOptions

    Ƭ ChartOptions<TType>: DeepPartial<CoreChartOptions<TType> & <TType> & PluginChartOptions<TType> & <TType> & ScaleChartOptions<TType> & [TType]["chartOptions"]>

    Type parameters

    NameType
    TTypeextends ChartType

    Defined in

    index.esm.d.ts:3501Exports - 图12 (opens new window)


    ChartType

    Ƭ ChartType: keyof ChartTypeRegistry

    Defined in

    index.esm.d.ts:3480 (opens new window)


    Color

    Ƭ Color: string | CanvasGradient | CanvasPattern

    Defined in


    DatasetChartOptions

    Ƭ DatasetChartOptions<TType>: { [key in TType]: object}

    Type parameters

    NameType
    TTypeextends ChartType

    Defined in


    DecimationOptions

    Ƭ DecimationOptions: LttbDecimationOptions | MinMaxDecimationOptions

    Defined in

    index.esm.d.ts:2066Exports - 图16 (opens new window)


    DefaultDataPoint

    Ƭ DefaultDataPoint<TType>: DistributiveArray<ChartTypeRegistry[TType]["defaultDataPoint"]>

    Type parameters

    NameType
    TTypeextends ChartType

    Defined in

    index.esm.d.ts:3510 (opens new window)


    DoughnutDataPoint

    Ƭ DoughnutDataPoint: number

    Defined in


    EasingFunction

    Ƭ EasingFunction: "linear" | "easeInQuad" | "easeOutQuad" | "easeInOutQuad" | "easeInCubic" | "easeOutCubic" | "easeInOutCubic" | "easeInQuart" | "easeOutQuart" | "easeInOutQuart" | "easeInQuint" | "easeOutQuint" | "easeInOutQuint" | "easeInSine" | "easeOutSine" | "easeInOutSine" | "easeInExpo" | "easeOutExpo" | "easeInOutExpo" | "easeInCirc" | "easeOutCirc" | "easeInOutCirc" | "easeInElastic" | "easeOutElastic" | "easeInOutElastic" | "easeInBack" | "easeOutBack" | "easeInOutBack" | "easeInBounce" | "easeOutBounce" | "easeInOutBounce"

    Defined in

    index.esm.d.ts:1509 (opens new window)


    ElementChartOptions

    Ƭ ElementChartOptions<TType>: Object

    Type parameters

    Type declaration

    NameType
    elementsElementOptionsByType<>

    Defined in

    index.esm.d.ts:1982Exports - 图20 (opens new window)


    FillTarget

    Ƭ FillTarget: number | string | { value: number } | "start" | "end" | "origin" | "stack" | "shape" | boolean

    Defined in


    InteractionMode

    Ƭ InteractionMode: keyof

    Defined in


    InteractionModeFunction

    Ƭ InteractionModeFunction: (chart: , e: ChartEvent, options: , useFinalPosition?: boolean) => InteractionItem[]

    Type declaration

    ▸ (chart, e, options, useFinalPosition?): InteractionItem[]

    Parameters
    NameType
    chartChart
    e
    optionsInteractionOptions
    useFinalPosition?boolean
    Returns

    InteractionItem[]

    Defined in

    index.esm.d.ts:702 (opens new window)


    LayoutPosition

    Ƭ LayoutPosition: "left" | "top" | "right" | "bottom" | "center" | "chartArea" | { [scaleId: string]: number; }

    Defined in


    LineController

    Ƭ LineController:

    Defined in


    LinearScale

    Ƭ LinearScale<O>: <O>

    Type parameters

    NameType
    Oextends LinearScaleOptions

    Defined in

    index.esm.d.ts:3094Exports - 图26 (opens new window)


    LinearScaleOptions

    Ƭ LinearScaleOptions: CartesianScaleOptions & { beginAtZero: boolean ; grace?: string | number ; suggestedMax?: number ; suggestedMin?: number ; ticks: { count: number ; format: Intl.NumberFormatOptions ; maxTicksLimit: number ; precision: number ; stepSize: number } }

    Defined in

    index.esm.d.ts:3045 (opens new window)


    LogarithmicScale

    Ƭ LogarithmicScale<O>: Scale<O>

    Type parameters

    NameType
    Oextends LogarithmicScaleOptions

    Defined in


    LogarithmicScaleOptions

    Ƭ LogarithmicScaleOptions: & { suggestedMax?: number ; suggestedMin?: number ; ticks: { format: Intl.NumberFormatOptions } }

    Defined in


    Overrides

    Ƭ Overrides: { [key in ChartType]: CoreChartOptions<key> & ElementChartOptions<key> & PluginChartOptions<key> & DatasetChartOptions<ChartType> & ScaleChartOptions<key> & ChartTypeRegistry[key][“chartOptions”]}

    Defined in

    index.esm.d.ts:680Exports - 图30 (opens new window)


    ParsedDataType

    Ƭ ParsedDataType<TType>: ChartTypeRegistry[TType]["parsedDataType"]

    Type parameters

    NameType
    TTypeextends ChartType

    Defined in


    Ƭ PieAnimationOptions:

    Defined in


    PieController

    Ƭ PieController:

    Defined in


    PieControllerChartOptions

    Ƭ PieControllerChartOptions:

    Defined in


    PieControllerDatasetOptions

    Ƭ PieControllerDatasetOptions:

    Defined in


    PieDataPoint

    Ƭ PieDataPoint:

    Defined in


    PieMetaExtensions

    Ƭ PieMetaExtensions:

    Defined in


    PointStyle

    Ƭ PointStyle: "circle" | "cross" | "crossRot" | "dash" | "line" | "rect" | "rectRounded" | "rectRot" | "star" | "triangle" | HTMLImageElement | HTMLCanvasElement

    Defined in

    index.esm.d.ts:1806 (opens new window)


    PolarAreaAnimationOptions

    Ƭ PolarAreaAnimationOptions: DoughnutAnimationOptions

    Defined in

    index.esm.d.ts:368Exports - 图39 (opens new window)


    RadarController

    Ƭ RadarController: DatasetController

    Defined in

    index.esm.d.ts:415 (opens new window)


    RadarControllerChartOptions

    Ƭ RadarControllerChartOptions: LineControllerChartOptions

    Defined in

    index.esm.d.ts:413Exports - 图41 (opens new window)


    RadialLinearScaleOptions

    Ƭ RadialLinearScaleOptions: CoreScaleOptions & { angleLines: { borderDash: <number[], ScriptableScaleContext> ; borderDashOffset: <number, ScriptableScaleContext> ; color: <Color, > ; display: boolean ; lineWidth: Scriptable<number, > } ; animate: boolean ; beginAtZero: boolean ; grid: GridLineOptions ; max: number ; min: number ; pointLabels: { backdropColor: <Color, > ; backdropPadding: Scriptable<number | , ScriptableScalePointLabelContext> ; color: <Color, > ; display: boolean ; font: Scriptable<, ScriptableScalePointLabelContext> ; callback: (label: string, index: number) => string } ; suggestedMax: number ; suggestedMin: number ; ticks: & { count: number ; format: Intl.NumberFormatOptions ; maxTicksLimit: number ; precision: number ; stepSize: number } }

    Defined in


    ScaleChartOptions

    Ƭ ScaleChartOptions<TType>: Object

    Type parameters

    NameType
    TTypeextends ChartType

    Type declaration

    NameType
    scalesObject

    Defined in

    index.esm.d.ts:3495Exports - 图43 (opens new window)


    ScaleOptions

    Ƭ ScaleOptions<TScale>: DeepPartial<ScaleOptionsByType<TScale>>

    Type parameters

    NameType
    TScaleextends ScaleType

    Defined in


    ScaleOptionsByType

    Ƭ ScaleOptionsByType<TScale>: { [key in ScaleType]: object & ScaleTypeRegistry[key][“options”]}[TScale]

    Type parameters

    NameType
    TScaleextends ScaleType

    Defined in


    ScaleType

    Ƭ ScaleType: keyof

    Defined in


    ScatterController

    Ƭ ScatterController:

    Defined in


    ScatterControllerChartOptions

    Ƭ ScatterControllerChartOptions:

    Defined in


    ScatterControllerDatasetOptions

    Ƭ ScatterControllerDatasetOptions:

    Defined in


    Scriptable

    Ƭ Scriptable<T, TContext>: T | (ctx: TContext, options: AnyObject) => T | undefined

    Type parameters

    Name
    T
    TContext

    Defined in


    ScriptableAndArray

    Ƭ ScriptableAndArray<T, TContext>: readonly T[] | <T, TContext>

    Type parameters

    Defined in

    index.esm.d.ts:39Exports - 图51 (opens new window)


    ScriptableAndArrayOptions

    Ƭ ScriptableAndArrayOptions<T, >: { [P in keyof T]: ScriptableAndArray<T[P], TContext>}

    Type parameters

    Name
    T
    TContext

    Defined in

    index.esm.d.ts:40 (opens new window)


    ScriptableOptions

    Ƭ ScriptableOptions<T, TContext>: { [P in keyof T]: Scriptable<T[P], TContext>}

    Type parameters

    Name
    T
    TContext

    Defined in

    index.esm.d.ts:38Exports - 图53 (opens new window)


    TextAlign

    Ƭ TextAlign: "left" | "center" | "right"

    Defined in


    TimeScaleOptions

    Ƭ TimeScaleOptions: & { adapters: { date: unknown } ; bounds: "ticks" | "data" ; ticks: { source: "labels" | "auto" | "data" } ; time: { displayFormats: { [key: string]: string; } ; isoWeekday: boolean | number ; minUnit: TimeUnit ; parser: string | (v: unknown) => number ; round: false | ; stepSize: number ; tooltipFormat: string ; unit: false | TimeUnit } }

    Defined in

    index.esm.d.ts:3125Exports - 图55 (opens new window)


    TimeSeriesScale

    Ƭ TimeSeriesScale<O>: TimeScale<O>

    Type parameters

    NameType
    Oextends TimeScaleOptions

    Defined in


    TimeUnit

    Ƭ TimeUnit: "millisecond" | "second" | "minute" | "hour" | "day" | "week" | "month" | "quarter" | "year"

    Defined in

    adapters.d.ts:1Exports - 图57 (opens new window)


    TooltipXAlignment

    Ƭ TooltipXAlignment: "left" | "center" | "right"

    Defined in


    TooltipYAlignment

    Ƭ TooltipYAlignment: "top" | "center" | "bottom"

    Defined in

    index.esm.d.ts:2376Exports - 图59 (opens new window)


    TransitionSpec

    Ƭ TransitionSpec<TType>: Object

    Type parameters

    NameType
    TTypeextends

    Type declaration

    NameType
    animation<TType>
    animationsAnimationsSpec<TType>

    Defined in

    index.esm.d.ts:1589 (opens new window)


    TransitionsSpec

    Ƭ TransitionsSpec<TType>: Object

    Type parameters

    NameType
    TTypeextends

    Index signature

    ▪ [mode: string]: <TType>

    Defined in


    UpdateMode

    Ƭ UpdateMode: keyof typeof

    Defined in

    Defined in


    BarController

    BarController: & { prototype: BarController }

    Defined in

    index.esm.d.ts:143 (opens new window)


    BarElement

    BarElement: ChartComponent & { prototype: <BarProps, > }

    Defined in


    BubbleController

    BubbleController: & { prototype: BubbleController }

    Defined in

    index.esm.d.ts:171 (opens new window)


    CategoryScale

    CategoryScale: ChartComponent & { prototype: <CategoryScaleOptions> }

    Defined in

    index.esm.d.ts:3040Exports - 图67 (opens new window)


    Decimation

    Const Decimation: Plugin

    Defined in

    index.esm.d.ts:2046 (opens new window)


    DoughnutController

    DoughnutController: ChartComponent & { prototype: }

    Defined in


    Element

    Element: Object

    Type declaration

    NameType
    prototypeElement<AnyObject, AnyObject>

    Defined in

    element.d.ts:14 (opens new window)


    Filler

    Const Filler: Plugin

    Defined in

    index.esm.d.ts:2068Exports - 图71 (opens new window)


    Interaction

    Const Interaction: Object

    Type declaration

    NameType
    modes

    Defined in


    Legend

    Const Legend:

    Defined in


    LineController

    LineController: & { prototype: LineController }

    Defined in

    index.esm.d.ts:215 (opens new window)


    LineElement

    LineElement: ChartComponent & { prototype: <LineProps, > }

    Defined in


    LinearScale

    LinearScale: & { prototype: LinearScale<> }

    Defined in


    LogarithmicScale

    LogarithmicScale: & { prototype: LogarithmicScale<> }

    Defined in


    PieController

    PieController: & { prototype: DoughnutController }

    Defined in

    index.esm.d.ts:355 (opens new window)


    PointElement

    PointElement: ChartComponent & { prototype: <PointProps, > }

    Defined in


    PolarAreaController

    PolarAreaController: & { prototype: PolarAreaController }

    Defined in

    index.esm.d.ts:383 (opens new window)


    RadarController

    RadarController: ChartComponent & { prototype: }

    Defined in


    RadialLinearScale

    RadialLinearScale: & { prototype: RadialLinearScale<> }

    Defined in


    ScatterController

    ScatterController: & { prototype: LineController }

    Defined in

    index.esm.d.ts:230Exports - 图83 (opens new window)


    SubTitle

    Const SubTitle: Plugin

    Defined in

    index.esm.d.ts:2333 (opens new window)


    Ticks

    Const Ticks: Object

    Type declaration

    NameType
    formattersObject
    formatters.logarithmic[object Object]
    formatters.numeric[object Object]
    formatters.values[object Object]

    Defined in

    index.esm.d.ts:1315Exports - 图85 (opens new window)


    TimeScale

    TimeScale: ChartComponent & { prototype: <TimeScaleOptions> }

    Defined in

    index.esm.d.ts:3205 (opens new window)


    TimeSeriesScale

    TimeSeriesScale: ChartComponent & { prototype: <TimeScaleOptions> }

    Defined in

    index.esm.d.ts:3211Exports - 图87 (opens new window)


    Title

    Const Title: Plugin

    Defined in

    index.esm.d.ts:2334 (opens new window)


    Tooltip

    Const Tooltip: Plugin & { positioners: { [key: string]: (items: readonly [], eventPosition: { x: number ; y: number }) => { x: number ; y: number } | false; } }

    Defined in


    _adapters

    Const _adapters: Object

    Type declaration

    NameType
    _dateDateAdapter

    Defined in

    adapters.d.ts:61 (opens new window)


    defaults

    Const defaults: Defaults

    Defined in

    index.esm.d.ts:690Exports - 图91 (opens new window)


    layouts

    Const layouts: Object

    Type declaration

    Defined in

    index.esm.d.ts:746 (opens new window)


    registerables

    registerables: readonly ChartComponentLike[]

    Defined in

    index.esm.d.ts:545Exports - 图93 (opens new window)


    Const registry:

    Defined in