Add getElementsAtEventForMode to @types/chart.js
See original GitHub issueHello,
It’s missing getElementsAtEventForMode from chart.js types, could that be added?
This works for me:
getElementsAtEventForMode: (e: any, mode: Chart.InteractionMode, options: any, useFinalPosition: boolean) => Chart.ChartPoint;
Thanks
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
API | Chart.js
Calling getElementsAtEventForMode(e, mode, options, useFinalPosition) on your Chart instance passing an event and a mode will return the ...
Read more >Use cases of getElementsAtEventForMode are not documented
Can you please add the use case documentation for the getElementsAtEventForMode. Digging through version history is slightly not obvious.
Read more >getElementsAtEventForMode() of chartJS 3.0 - Stack Overflow
My question is getElementsAtEventForMode() is not working as expected When line data is null. // Same result. const elements = myChart.
Read more >Handle chart click event - Javascript Chart.js - Java2s.com
<html lang="en"> <head> <title>chart.js barcode value</title> </head> <body ... getElementsAtEventForMode(evt, 'point', myChart.options); var firstPoint ...
Read more >@types/chartjs - npm
TypeScript definitions for Chart.js. Latest version: 0.0.31, last published: 5 ... Author message: '@types/chartjs' is now '@types/chart.js' ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@types/chart.js
is not maintained by chart.js afaik, also those are the typings for v2. In v2 there was nogetElementsAtEventForMode
. Since chart.js v3 chart.js comes with build in typing andgetElementsAtEventForMode
is defined in the typings here: https://github.com/chartjs/Chart.js/blob/8d68b119bcb95af182cc69d42acad8490af53d3e/types/index.esm.d.ts#L502Thanks for answering @kurkle I know this is not the appropriate place to solve this kind of problem, so I made a SO question
Already tried to remove @types/chart.js And the errors are that my class doesn’t recognize any method, class, type from chartjs