Look for the following line in the runForceGraph:
const containerRect = container.getBoundingClientRect();
Add before that line something like:
container.innerHTML = '';
Another option is to clean/clear the container in the useEffect of the containing component.
Hey Gil! Ok, the question is HOW, how do I do that. Could you show me how to do it?
Look for the following line in the runForceGraph:
const containerRect = container.getBoundingClientRect();
Add before that line something like:
container.innerHTML = '';
Another option is to clean/clear the container in the useEffect of the containing component.
container.innerHTML = '';
did not work.
How do you clear that container, like the second option you described?
Having the graph react to data change is very important for me.
Thanks.