Topic: Chart component not updating when changes are made to labels and datasets
When I update labels and datasets properties on mdbChart at the same time only data sets are updated - not the labels.
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')
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
- User: Pro
- Premium support: No
- Technology: MDB Angular
- MDB Version: -
- Device: -
- Browser: -
- OS: -
- Provided sample code: Yes
- Provided link: No