react-d3-graph
react-d3-graph copied to clipboard
collapse.helper example
Is your feature request related to a problem? Please describe. Want to be able to collapse the middle node, not only the leaf node
Describe the solution you'd like When click at the middle node, all the dependencies of this node will collapse. If one child have multiple parents, then the link associate with this parent will become hidden.
Describe your use case in building a graph map
Describe alternatives you've considered use opacity in the link config to hide specific link
Additional context can you give me some pointers about how to call functions inside the collapse.helper such as "computeNodeDegree(nodeId, linksMatrix" and "isNodeVisible"? I can not find any document or examples about how to use it. Thanks.
Hi @me-zhang, sorry about that, probably they should not be documented because they are internal mechanisms of the library rather than tools that we expose to the client. If you're really interested in doing so, you would have to import the node_modules deep. But if it comes that you really need that implementation, I would suggest simply copying & past the module into your own project.