Open javico2609 opened 7 years ago
you have to subscribe to the observable and add private cd: ChangeDetectorRef dependency in your component constructor. Then in the subscribe method when a change happen call this.cd.markForCheck().
I have added the private cd: ChangeDetectorRef to the constructor and when I update the data for the pie/bar chart using this.cd.markForCheck() then it still doesn't work!
I'm submitting a ... (check one with "x")
Current behavior If use ChangeDetectionStrategy.OnPush + Observable, the chart never update
Expected behavior Proper update of the chart
Reproduction of the problem
What is the motivation / use case for changing the behavior?
Please tell us about your environment:
WebStorm, Yarn v1.2.0
ngx-charts version: x.x.x "@swimlane/ngx-charts": "^6.1.0",
Angular version: 2.x.x "@angular/": "^4.4.5",
Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]
Chrome 61.0.3163.100
Language: [all | TypeScript X.X | ES6/7 | ES5]