diff --git a/src/app/Topology/GraphView/TopologyGraphView.tsx b/src/app/Topology/GraphView/TopologyGraphView.tsx index f974d1c77..466b1a821 100644 --- a/src/app/Topology/GraphView/TopologyGraphView.tsx +++ b/src/app/Topology/GraphView/TopologyGraphView.tsx @@ -183,6 +183,11 @@ export const TopologyGraphView: React.FC = ({ transformC }, }; + // Destroy old graph if any + if (visualization.hasGraph()) { + visualization.getGraph().destroy(); + } + // Initialize the controller with model to create nodes visualization.fromModel(model, false); }, [_transformData, visualization, discoveryTree]);