Topic: [BUG] Charts dynamic options does not work for bug

develcti priority asked 2 years ago


Expected behavior

When I have a mdbCharts and I update the options passed dynamically (for example with an async pipe) I expect the chart to update correctly with the new configuration.

Actual behavior

I get the reported error instead. I thinks there is an evident bug inside the directive: when it calls rebuild() in order to update the options the method _destroyChart does set _chart to null but does not update the _isInitialized that should be set to false in order to rebuild the chart.

Resources (screenshots, code snippets etc.)

core.mjs:6494 ERROR TypeError: Cannot set properties of null (setting 'options')
at set options [as options] (mdb-angular-ui-kit-charts.mjs:278:13)
at setInputsForProperty (core.mjs:11016:1)
at elementPropertyInternal (core.mjs:10037:1)
at ɵɵproperty (core.mjs:14483:1)
at DefaultGraphComponent_Template (defaultgraph.component.html:2:35)
at executeTemplate (core.mjs:9632:1)
at refreshView (core.mjs:9495:1)
at refreshComponent (core.mjs:10692:1)
at refreshChildComponents (core.mjs:9291:1)
at refreshView (core.mjs:9545:1)

Arkadiusz Idzikowski staff commented 2 years ago

We released v3.0.0 today which includes a fix for the rebuild method. Please upgrade your version and let us know if the problem is resolved.


develcti priority commented 2 years ago

Thank you, as soon as I'll be able to upgrade to angular 14 I'll get to that



Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Resolved

Specification of the issue

  • ForumUser: Priority
  • Premium support: Yes
  • Technology: MDB Angular
  • MDB Version: MDB5 2.3.0
  • Device: Desktop
  • Browser: Chrome
  • OS: MacOS Monterey
  • Provided sample code: Yes
  • Provided link: No