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

Could not find the label and dataset value in click event #15

Closed
contact2vikas opened this issue Jan 29, 2022 · 3 comments
Closed

Could not find the label and dataset value in click event #15

contact2vikas opened this issue Jan 29, 2022 · 3 comments
Labels
bug Something isn't working invalid This doesn't seem right

Comments

@contact2vikas
Copy link

contact2vikas commented Jan 29, 2022

options: {

    onClick: (e) => {
      
  const canvasPosition = ctx.helpers.getRelativePosition(e, ctx);

}

Getting below error

core.mjs:6461 ERROR TypeError: Cannot read properties of undefined (reading 'getRelativePosition')
at Chart.onClick (app.component.ts:37:42)
at callback (helpers.segment.js:92:1)
at Chart._handleEvent (chart.esm.js:6090:17)
at Chart._eventHandler (chart.esm.js:6072:1)
at listener (chart.esm.js:5952:1)
at Chart.event (chart.esm.js:3214:1)
at helpers.segment.js:28:1
at timer (zone.js:2561:1)
at ZoneDelegate.invokeTask (zone.js:406:1)
at Object.onInvokeTask (core.mjs:25444:1)

@contact2vikas contact2vikas added the bug Something isn't working label Jan 29, 2022
@sgratzl sgratzl added the invalid This doesn't seem right label Jan 29, 2022
@sgratzl
Copy link
Owner

sgratzl commented Jan 29, 2022

please ask the chart.js guys directly, since this is a just a plugin of chart.js and this related to chart.js itself

@sgratzl sgratzl closed this as completed Jan 29, 2022
@contact2vikas
Copy link
Author

Below is the reply from chat.js

I can't tell if this is an issue with chart.js itself or with chartjs-chart-wordcloud. Have you already reported this issue to the extension?

@sgratzl
Copy link
Owner

sgratzl commented Jan 30, 2022

can you provide a complete example, e.g. on codepen or codesandbox. Without a complete example it is difficult to reproduce it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

2 participants