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.

Cannot set properties of undefined (setting 'display') at resolveLabelElementProperties

See original GitHub issue

We seem to be stuck with plugin-annotation v1.3.0 and chartjs v3.7.0 where following example for a line chart with multiple datasets works with multiple annotations.

https://codepen.io/dbauszus-glx/pen/MWOjGzw

Upgrading plugin-annotation to v2.0.0 causes following TypeError: Cannot set properties of undefined (setting 'display') at resolveLabelElementProperties.

Upgrading chartjs to v3.9.1 causes a different TypeError: Cannot read properties of undefined (reading 'lastIndexOf')

The same error persists with chartjs on v3.9.1 and plugin-aanotation on v2.0.0

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:17

github_iconTop GitHub Comments

2reactions
janthuraucommented, Nov 10, 2022

hey @stockiNail, I’ve just tried to reproduce this in a sandbox, but it does work there.

In my setup, I’m generating the charts on the backend with nodejs (using ChartJSNodeCanvas). Probably that’s something on their side then…

1reaction
dbauszus-glxcommented, Sep 8, 2022

Sorry for the late reply as I was on holidays. I just checked this now and chart 3.9.1 with plugin annotation 2.0.1 works as expected if imported through skypack. Thanks for looking into this.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot set property 'display' of undefined - Stack Overflow
document.getElementsByClassName('btn-pageMenu') delivers a nodeList. You should use: document.getElementsByClassName('btn-pageMenu')[0].style.display (if ...
Read more >
Cannot set properties of undefined (setting 'display') in JS
The "TypeError: Cannot set properties of undefined (setting 'display')" error occurs when trying to set the display property on an undefined value.
Read more >
Cannot set property 'display' of undefined. Why does 'this ...
Uncaught TypeError: Cannot set property 'display' of undefined. Why does 'this' come out undefined? I think I followed this step closely, ...
Read more >
Javascript error - cannot set property 'display' of undefined ...
I'm using ace in a wordpress plugin. It works fine on 200 000+ installations. However, on one site it does not work -...
Read more >
cannot set properties of undefined (setting 'display') - You.com
The main issue in your code is because Element.style has no css property. It's intended that you set the individual style properties, which...
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