-
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
ChangeDetection for Charts #2235
Comments
@Mrtcndkn now when i've updated to this version all my graphs stops drawing. can you explain? |
This doesn´t work for me. Just like using |
"dependencies": { |
This change will be available after 4.0.RC1 |
when using version 2.0.3 my current implementation stopped drawing the graphs, so i reverted back to version 2.0.0-rc.1 |
After 4.0.RC1 it will work. If there are any problems afterward then feel free to reopen the issue. |
ok, any idea why after version 2.0.0-rc.1 the graphs are not drawing? code did not change and im starting it by calling setTimeout(() => this.chart.refresh(), 100); |
There is no change in that version maybe you can try it with 2.0.0 final version @unaor |
here is an example repo showing |
Hi,
<p-chart #chart type="pie" [data]="data" [options]="options"></p-chart>
import { UIChart } from 'primeng/primeng';
...
@ViewChild('chart') chart: UIChart;
...
ngOnChanges(changes: SimpleChanges): void {
if (changes.inputData.currentValue) {
// update this.data here
// then chart is getting updated
setTimeout(() => {
this.chart.reinit();
}, 100);
}
} :) |
Hi All, same problem i am facing during chart refresh, in my case neither is working |
Still facing the problem of chart.refresh not working - does not update graph - on PrimeNG 7.1.0-rc.1. But the provided code by Mrtcndkn worked as expected. |
Hi Any help will be highly appreciated |
-When the data of charts changed dynamically it should reinitialize the view.
-It should be used with a new array for changeDetection to work.
For example;
The text was updated successfully, but these errors were encountered: