I am trying out swimlane ngx-graph, in my application user can delete or add nodes. Based on delete or add action I will update my data accordingly.
Real question now is how can I refresh my graph without refreshing entire page.
You can update it by using the update$
option of the graph,
HTML :
<ngx-graph
. . . // Other options
[update$]="update$"
. . .
>
TS :
// Observable for update
update$: Subject<any> = new Subject();
// Update function
updateChart(){
this.update$.next(true);
}
Once you update your data, call updateChart()