Chart.js - v3.0.2

    Classes

    Interfaces

    AnimationOptions

    Type parameters:

    Type declaration:

    NameType
    animationfalse | <TType> & { onComplete?: (this: Chart, event: ) => void ; onProgress?: (this: Chart, event: ) => void }
    animationsAnimationsSpec<TType>
    transitions<TType>

    Defined in: index.esm.d.ts:1526 (opens new window)


    AnimationSpec

    Ƭ AnimationSpec<TType>: object

    Type parameters:

    NameType
    TType

    Type declaration:

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

    Defined in:


    AnimationsSpec

    Ƭ AnimationsSpec<TType>: object

    Type parameters:

    NameType
    TTypeChartType

    Type declaration:

    Defined in:


    BarController

    Ƭ BarController: DatasetController

    Defined in:


    BubbleController

    Ƭ BubbleController: DatasetController

    Defined in:


    CategoryScale

    Ƭ CategoryScale<O>: Scale<O>

    Type parameters:

    NameTypeDefault
    OCategoryScaleOptions

    Defined in:


    CategoryScaleOptions

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

    Defined in:


    ChartComponentLike

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

    Defined in:


    ChartDataset

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

    Type parameters:

    NameTypeDefault
    TTypeChartType
    TData-TType[]

    Defined in:


    ChartItem

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

    Defined in: index.esm.d.ts:500API - 图1 (opens new window)


    ChartOptions

    Ƭ ChartOptions<TType>: DeepPartial<<TType> & ElementChartOptions & <TType> & DatasetChartOptions<TType> & <TType> & ChartTypeRegistry[TType][chartOptions]>

    Type parameters:

    NameTypeDefault
    TTypeChartType

    Defined in:


    ChartType

    Ƭ ChartType: keyof ChartTypeRegistry

    Defined in:


    Color

    Ƭ Color: string | CanvasGradient | CanvasPattern

    Defined in: color.d.ts:1 (opens new window)


    DatasetChartOptions

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

    Type parameters:

    NameTypeDefault
    TTypeChartType

    Defined in:


    DecimationOptions

    Ƭ DecimationOptions: LttbDecimationOptions | MinMaxDecimationOptions

    Defined in: index.esm.d.ts:1943 (opens new window)


    DefaultDataPoint

    Ƭ DefaultDataPoint<TType>: [TType][defaultDataPoint][]

    Type parameters:

    NameType
    TTypeChartType

    Defined in:


    DoughnutDataPoint

    Ƭ DoughnutDataPoint: number

    Defined in: index.esm.d.ts:294 (opens new window)


    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:


    FillTarget

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

    Defined in: index.esm.d.ts:1950 (opens new window)


    InteractionMode

    Ƭ InteractionMode: keyof

    Defined in: index.esm.d.ts:695API - 图2 (opens new window)


    InteractionModeFunction

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

    Type declaration:

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

    Parameters:

    Returns: []

    Defined in: index.esm.d.ts:657 (opens new window)


    LayoutPosition

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

    Defined in:


    LineController

    Ƭ LineController: DatasetController

    Defined in:


    LinearScale

    Ƭ LinearScale<O>: Scale<O>

    Type parameters:

    NameTypeDefault
    OLinearScaleOptions

    Defined in:


    LinearScaleOptions

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

    Defined in:


    LogarithmicScale

    Ƭ LogarithmicScale<O>: Scale<O>

    Type parameters:

    NameTypeDefault
    OLogarithmicScaleOptions

    Defined in:


    LogarithmicScaleOptions

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

    Defined in:


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

    Defined in: index.esm.d.ts:635API - 图3 (opens new window)


    ParsedDataType

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

    Type parameters:

    NameTypeDefault
    TTypeChartType

    Defined in: index.esm.d.ts:3261 (opens new window)


    PieAnimationOptions

    Defined in:


    PieController

    Ƭ PieController: DoughnutController

    Defined in:


    PieControllerChartOptions

    Ƭ PieControllerChartOptions: DoughnutControllerChartOptions

    Defined in:


    PieControllerDatasetOptions

    Ƭ PieControllerDatasetOptions: DoughnutControllerDatasetOptions

    Defined in:


    PieDataPoint

    Ƭ PieDataPoint: DoughnutDataPoint

    Defined in:


    PointStyle

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

    Defined in: index.esm.d.ts:1706 (opens new window)


    PolarAreaAnimationOptions

    Ƭ PolarAreaAnimationOptions:

    Defined in: index.esm.d.ts:331API - 图4 (opens new window)


    RadarController

    Ƭ RadarController:

    Defined in: index.esm.d.ts:380 (opens new window)


    RadarControllerChartOptions

    Ƭ RadarControllerChartOptions:

    Defined in: index.esm.d.ts:378API - 图5 (opens new window)


    RadialLinearScaleOptions

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

    Defined in:


    ScaleChartOptions

    Ƭ ScaleChartOptions<TType>: object

    Type parameters:

    NameTypeDefault
    TTypeChartType

    Type declaration:

    NameType
    scalesobject

    Defined in: index.esm.d.ts:3244API - 图6 (opens new window)


    ScaleOptions

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

    Type parameters:

    NameTypeDefault
    TScaleScaleType

    Defined in: index.esm.d.ts:3236 (opens new window)


    ScaleOptionsByType

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

    Type parameters:

    NameTypeDefault
    TScaleScaleType

    Defined in:


    ScaleType

    Ƭ ScaleType: keyof ScaleTypeRegistry

    Defined in:


    ScatterController

    Ƭ ScatterController: LineController

    Defined in:


    ScatterControllerChartOptions

    Ƭ ScatterControllerChartOptions: LineControllerChartOptions

    Defined in:


    ScatterControllerDatasetOptions

    Ƭ ScatterControllerDatasetOptions: LineControllerDatasetOptions

    Defined in:


    Scriptable

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

    Type parameters:

    Name
    T
    TContext

    Defined in: index.esm.d.ts:28 (opens new window)


    ScriptableAndArray

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

    Type parameters:

    Name
    T
    TContext

    Defined in: index.esm.d.ts:30API - 图7 (opens new window)


    ScriptableAndArrayOptions

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

    Type parameters:

    Defined in:


    ScriptableOptions

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

    Type parameters:

    Name
    T
    TContext

    Defined in: index.esm.d.ts:29API - 图8 (opens new window)


    TextAlign

    Ƭ TextAlign: left | center | right

    Defined in:


    TimeScaleOptions

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

    Defined in: index.esm.d.ts:2865API - 图9 (opens new window)


    TimeSeriesScale

    Ƭ TimeSeriesScale<O>: <O>

    Type parameters:

    NameTypeDefault
    OTimeScaleOptions

    Defined in: index.esm.d.ts:2950 (opens new window)


    TimeUnit

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

    Defined in:


    TooltipXAlignment

    Ƭ TooltipXAlignment: left | center | right

    Defined in: index.esm.d.ts:2211 (opens new window)


    TooltipYAlignment

    Ƭ TooltipYAlignment: top | center | bottom

    Defined in:


    TransitionSpec

    Ƭ TransitionSpec<TType>: object

    Type parameters:

    NameType
    TTypeChartType

    Type declaration:

    NameType
    animation<TType>
    animationsAnimationsSpec<TType>

    Defined in:


    Ƭ TransitionsSpec<TType>: object

    Type parameters:

    NameType
    TTypeChartType

    Type declaration:

    Defined in:


    UpdateMode

    Ƭ UpdateMode: keyof typeof UpdateModeEnum

    Defined in:

    ArcElement

    Defined in: index.esm.d.ts:1626API - 图10 (opens new window)


    BarController

    BarController: & { prototype: BarController }

    Defined in:


    BarElement

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

    Defined in: index.esm.d.ts:1856API - 图11 (opens new window)


    BubbleController

    BubbleController: & { : BubbleController }

    Defined in:


    CategoryScale

    CategoryScale: ChartComponent & { prototype: <CategoryScaleOptions> }

    Defined in:


    DoughnutController

    DoughnutController: ChartComponent & { prototype: }

    Defined in: index.esm.d.ts:306 (opens new window)


    Element

    Element: object

    Type declaration:

    NameType
    prototype<{}, {}>

    Defined in: element.d.ts:27API - 图12 (opens new window)


    Filler

    Const Filler:

    Defined in: index.esm.d.ts:1945 (opens new window)


    Interaction

    Const Interaction: object

    Type declaration:

    NameType
    modes

    Defined in: index.esm.d.ts:697API - 图13 (opens new window)


    Legend

    Const Legend:

    Defined in: index.esm.d.ts:1974 (opens new window)


    LineController

    LineController: & { prototype: LineController }

    Defined in:


    LineElement

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

    Defined in: index.esm.d.ts:1696 (opens new window)


    LinearScale

    LinearScale: & { prototype: LinearScale<> }

    Defined in: index.esm.d.ts:2835API - 图14 (opens new window)


    LogarithmicScale

    LogarithmicScale: & { prototype: LogarithmicScale<> }

    Defined in: index.esm.d.ts:2860 (opens new window)


    PieController

    PieController: & { prototype: DoughnutController }

    Defined in:


    PointElement

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

    Defined in: index.esm.d.ts:1807 (opens new window)


    PolarAreaController

    PolarAreaController: & { prototype: PolarAreaController }

    Defined in:


    RadarController

    RadarController: ChartComponent & { prototype: }

    Defined in: index.esm.d.ts:381 (opens new window)


    RadialLinearScale

    RadialLinearScale: & { prototype: RadialLinearScale<> }

    Defined in: index.esm.d.ts:3101API - 图15 (opens new window)


    ScatterController

    ScatterController: & { prototype: LineController }

    Defined in:


    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:1262API - 图16 (opens new window)


    TimeScale

    TimeScale: & { prototype: TimeScale<> }

    Defined in: index.esm.d.ts:2945 (opens new window)


    TimeSeriesScale

    TimeSeriesScale: & { prototype: TimeSeriesScale<> }

    Defined in: index.esm.d.ts:2951API - 图17 (opens new window)


    Title

    Const Title:

    Defined in: index.esm.d.ts:2170 (opens new window)


    Tooltip

    Const Tooltip: & { positioners: { [key: string]: (items: readonly Element[], eventPosition: { x: number ; y: number }) => { x: number ; y: number }; } ; getActiveElements: () => [] ; setActiveElements: (active: ActiveDataPoint[], eventPosition: { x: number ; y: number }) => void }

    Defined in:


    _adapters

    Const _adapters: object

    Type declaration:

    NameType
    _dateDateAdapter

    Defined in:


    defaults

    Const defaults: Defaults

    Defined in:


    layouts

    Const layouts: object

    Type declaration:

    Defined in: index.esm.d.ts:701 (opens new window)


    Const registerables: readonly []

    Defined in: index.esm.d.ts:498API - 图18 (opens new window)


    registry

    Const registry:

    Defined in: index.esm.d.ts:1054 (opens new window)