Topic: Chart component not updating when changes are made to labels and datasets

Łukasz Salamon pro asked 5 years ago


Hi,

When I update labels and datasets properties on mdbChart  at the same time only data sets are updated - not the labels.

Workaround:

I've looked on chartDirective.ts code and I can see that in 'ngOnChanges' you checking for hasOwnProperties for datasets and if so updateChartData is executed.

For my use case I've changed the if statement to be :

((changes.hasOwnProperty('data') || changes.hasOwnProperty('datasets'))) && !changes.hasOwnProperty('labels')

riccy pro answered 4 years ago


still thinking about fixing this?

Dawid Adach pro commented 4 years ago

Dear riccy, thank you, this is still on our todo list. We will take care of that in following sprints.

gordysc pro commented 4 years ago

I just spent a good chunk of time on this today.. Do we have an ETA at least? Thanks for all the great work on this stuff!

Damian Gemza staff commented 4 years ago

Dear gordysc, This problem will be fixed with the next release of MDB Angular. Best Regards, Damian

Techatract pro commented 4 years ago

I still have this problem - is there an ETA?

Damian Gemza staff commented 4 years ago

Dear Techatract, This problem was fixed with MDB Angular 6.2.0 version. Which version you're using? Best Regards, Damian

Edyta Dabrowska free answered 5 years ago


Hi, thank you for noticing! We will think about fixing this in the future.

Please insert min. 20 characters.

FREE CONSULTATION

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

Status

Specification of the issue

  • User: Pro
  • Premium support: No
  • Technology: MDB Angular
  • MDB Version: -
  • Device: -
  • Browser: -
  • OS: -
  • Provided sample code: Yes
  • Provided link: No
Tags