You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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)
redalpha01
changed the title
[Chart.js@4.4.4] - [typescript.js@5.5.3] - Type issue with custom positioners using exxisting positioners as base position.
[Chart.js@4.4.4] - [typescript.js@5.5.3] - Type issue with custom positioners using existing positioners as base position.
Sep 19, 2024
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
The text was updated successfully, but these errors were encountered: