question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Property "register" undefined?

See original GitHub issue

Hi,

Trying to use this plugin. I have two charts that are loaded via AJAX call for data. The problem is that when used with Chart JS 3.2.0 I get this error in Console and plugin does not work:

chartjs-plugin-crosshair@1:7 Uncaught TypeError: Cannot read property 'register' of undefined
    at chartjs-plugin-crosshair@1:7
    at chartjs-plugin-crosshair@1:7
    at chartjs-plugin-crosshair@1:7
    at chartjs-plugin-crosshair@1:7

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
vincepolstoncommented, Jul 3, 2021

I just built the version from chartjs3 branch and confirmed it works with ChartJS 3.4.0.

Unforeseen issue: It appears the plugin itself is enabled globally just by including the script. It also defaults to group all charts… To stop the grouping I had to set sync to enabled: false in the plugin itself whereas it was set to true on line 121

sync: { enabled: false, group: 1, suppressTooltips: false },

I haven’t figured out how to make it only be enabled on the charts that I want yet.

0reactions
AbelHeinsbroekcommented, Jun 30, 2021

I’ve started a chartjs3 branch to work on chartjs3.4 compatibility. Could you check if that version works for you?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Getting an error "TypeError: Cannot read property 'register' of ...
I get an error TypeError: Cannot read property 'register' of undefined while attempting to register any user to the database using a post ......
Read more >
Strapi TypeError: Cannot read property 'register' of undefined
Locally, the app is running, I just added a new model and when I deployed it, it has this error. I looked for...
Read more >
Uncaught TypeError: Cannot read property 'register ... - GitHub
I added torch to package.json and installed. It's loading the torch.js but erring on the pickaday import: Using webpack. It may be due...
Read more >
Cannot read property 'register' of undefined - Google Groups
Uncaught TypeError: Cannot read property 'register' of undefined. 535 views. Skip to first unread message.
Read more >
Cannot read properties of undefined (reading 'post')
We get the following error “Cannot read properties of undefined (reading 'post')” and the user cant proceed with the registration.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found