Cannot set properties of undefined (setting 'display') at resolveLabelElementProperties
See original GitHub issueWe 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:
- Created a year ago
- Comments:17
Top 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 >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
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…
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.