Skip to content

TypeScript definition missing for new layout.autoPadding option in 3.6.0 #9856

Description

@cascornelissen

Expected Behavior

Types are updated to match new layout.autoPadding option, introduced in #9716.

Current Behavior

The following options object throws an error. The code does what I expect from it when adding a // @ts-ignore above it.

const options: ChartOptions<'line'> = {
    layout: {
        autoPadding: false
    }
}

Possible Solution

A type definition added for this option here?

Chart.js/types/index.esm.d.ts

Lines 1493 to 1495 in e43730e

layout: {
padding: Scriptable<number | Partial<ChartArea>, ScriptableContext<TType>>;
};

Environment

  • Chart.js version: 3.6.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions