-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Chart component is not working properly with uiChart.refresh() method #1422
Comments
You need
|
Thanks! It worked. Now I believe that the showcase should be updated with this information. |
I'm doing the same, but I receive the following error:
Can you tell what is wrong? |
Are you calling timer callback as a separate function like below??
|
I believe this workaround should be handled internally, without requiring users to use |
This workaround does not seem to be working any more. I used exactly the same code as above + setTimeOut() but my chart won't update after calling the chart.refresh() method. Update: I'm now using this as a workaround. |
#2235 this is related to changeDetection when the data attribute changes. And locally refresh method is working fine when I change something inside the data object. |
Please try with the latest PrimeNG version and comment if the issue still persists. |
UPDATE: The problem was solved using "setTimeout(() => this.uiChart.refresh(), 100)" instead of "this.uiChart.refresh()" only. I believe that the showcase should be updated with this information.
I'm submitting a ... (check one with "x")
Current behavior
I try to update the chart using the refresh() method as the example in showcase suggests. The changes occurs only on the second button click.
Expected behavior
Once the refresh() is called, the chart is updated with current model.
Minimal reproduction of the problem with instructions
What is the motivation / use case for changing the behavior?
Fix the problem.
Please tell us about your environment:
Ubuntu 16.04, Chrome 52.
Angular version: 2.0.X
Angular 2.2.1
PrimeNG version: 2.0.X
PrimeNG 1.0.0
Yes
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 52, Firefox 45
Language: [all | TypeScript X.X | ES6/7 | ES5]
TypeScript 2.0.10
Node (for AoT issues):
node --version
=N.A.
The text was updated successfully, but these errors were encountered: