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

Type error with BubbleDataPoint when using ChartData<'bubble'> #11602

Closed
thomas-haufe opened this issue Nov 30, 2023 · 1 comment
Closed

Type error with BubbleDataPoint when using ChartData<'bubble'> #11602

thomas-haufe opened this issue Nov 30, 2023 · 1 comment
Labels
type: bug type: types Typescript type changes

Comments

@thomas-haufe
Copy link

Expected behavior

There should be no TypeScript error.

Current behavior

There is this error even though the code runs fine:
Property 'r' is missing in type '{ x: number; y: number; }' but required in type 'BubbleDataPoint'.

Reproducible sample

https://www.typescriptlang.org/play?#code/JYWwDg9gTgLgBAbzgYQBYENYBoUdgEXRnTgF84AzKCEOAcgGM8YA6AKwGc6BuAWACgBDCADsO8ACZF0ALlyYYhYgB46AIwCuatQBsApnQB8cALyIBcOFOIc9MDnIDaFy+f6vXO9Gr065da3RbGDosFw9ApwQADzkARhwATzkAJlIcGNSkuQBmUgBdMPcPOCh0CWANBzgACgYYaIBKU2M4gFYij3SXQoFSPkF+ADdMOHro0ysIBg0QPRFWAHM7AFF9OYWAIUSASQkagCIQRLQFA+aguAAJABUAWQAZZHQREY41vQ2YAZGoOGPTrBJiI9AB3eSwOoNDLhOAwRJgPT+TTafShWGRKzSTpkIqNbhAA

Optional extra steps/info to reproduce

No response

Possible solution

No response

Context

If I leave out the type ChartData<'bubble'> for the variable data, there is no error. However, I lose the implicit type information for the ctx parameter of the radius function so I don't view this as a valid solution.

chart.js version

v4.4.0

Browser name and version

No response

Link to your project

No response

@thomas-haufe
Copy link
Author

Should be fixed by #11662.

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

No branches or pull requests

2 participants