Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
cascornelissen opened this issue Nov 15, 2021 · 0 comments · Fixed by #9858
Closed

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

cascornelissen opened this issue Nov 15, 2021 · 0 comments · Fixed by #9858
Labels
type: bug type: types Typescript type changes
Milestone

Comments

@cascornelissen
Copy link

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug type: types Typescript type changes
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants