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

[[email protected]] - [[email protected]] - Type issue with custom positioners using existing positioners as base position. #11902

Open
redalpha01 opened this issue Sep 19, 2024 · 0 comments
Labels
type: types Typescript type changes

Comments

@redalpha01
Copy link

Expected behavior

Following the samples here and here should not lead to a type error.

Current behavior

When using the sample to create a custom positioner, a typescript error is shown
The 'this' context of type 'TooltipPositionerMap' is not assignable to method's 'this' of type 'TooltipModel<keyof ChartTypeRegistry>'. Type 'TooltipPositionerMap' is missing the following properties from type 'TooltipModel<keyof ChartTypeRegistry>': chart, dataPoints, xAlign, yAlign, and 23 more.(2684)

Reproducible sample

https://stackblitz.com/edit/vitejs-vite-jgc8rw?file=src%2Fmain.ts

Optional extra steps/info to reproduce

The definition is in src/definitions/global.d.ts and the issue can be seen in src/main.ts

Possible solution

No response

Context

No response

chart.js version

4.4.4

Browser name and version

No response

Link to your project

No response

@redalpha01 redalpha01 changed the title [[email protected]] - [[email protected]] - Type issue with custom positioners using exxisting positioners as base position. [[email protected]] - [[email protected]] - Type issue with custom positioners using existing positioners as base position. Sep 19, 2024
@LeeLenaleee LeeLenaleee added type: types Typescript type changes and removed type: bug labels Sep 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: types Typescript type changes
Projects
None yet
Development

No branches or pull requests

2 participants