-
Notifications
You must be signed in to change notification settings - Fork 331
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
Cannot set properties of undefined (setting 'backgroundColor') #918
Comments
@Joy-300799 thank you for feedback. May I ask you if you can provide chart options, with annotation plugin config, to try to reproduce the issue? |
@RomainChardon thank you very much for screenshot. It's not clear to me when The |
it's weird... let me take time to try to reproduce it because I'm still fighting to get the same or similar issue |
On the Symfony ux side I opened an issue, this partially solved the problem. It seems to me that now it's a problem in the configuration of my chart Here is the solution provided by the Symfony ux teams : |
Any updates? Using Symfony UX, like @RomainChardon , and with this configuration:
I still get an JS error: TypeError: undefined is not an object (evaluating 'o.borderWidth') |
I have a similar error in remix - when loading a page
commenting out |
@RomainChardon I have seen that your issue in Symfony UX was closed (symfony/ux#1474 (comment)) by you. Maybe you could explain what you did to solve it. It could be helpful for others. |
I have installed ChartJs and Symfony UX-ChartJs and built it with Encore. In my controller, I call the chartBuilder and create the chart in PHP. Finally, I pass it to the view with {{ render_chart }} while remembering to include {{ encore_entry_link_tags('app') }} and {{ encore_entry_script_tags('app') }}.
|
Seeing a console error intermittently while navigating form some different application, the chart js plugin annotation gives me erroe saying
instrument.js:122 TypeError: Cannot set properties of undefined (setting 'backgroundColor') at qe (chartjs-plugin-annotation.esm.js:778:9) at ge (chartjs-plugin-annotation.esm.js:720:17) at O.resolveElementProperties (chartjs-plugin-annotation.esm.js:939:12) at vt (chartjs-plugin-annotation.esm.js:2065:32) at Object.afterUpdate (chartjs-plugin-annotation.esm.js:2232:5) at zt (helpers.segment.js:79:19) at dn._notify (chart.js:5073:17) at dn.notify (chart.js:5056:29) at n.notifyPlugins (chart.js:6338:30) at n.update (chart.js:5899:14) at new n (chart.js:5652:18)
I am using box annotation, This works on manual reloading the page.
The text was updated successfully, but these errors were encountered: