dagre-d3
dagre-d3 copied to clipboard
Filter nodes
Hi!
Is it possible to filter out some nodes? i.e. I want to make them a part of the graph, but I don't want nodesep to be applied to them and I also want to make them invisible.
Thanks!
Better to filter with d3.filter method.
nope. It will create missing connections.
But I want:
a -> b -> c
filter B
a -> c
You need to re-process your data yourself. It's supported in dagre-d3.
I can do a lot myself :) But, if we talk about a library, I expect some handy stuff to be built-in, this is why I raised this issue :)
@bsideup Apparently there is a un documented filterNodes function inside dagre: https://github.com/dagrejs/graphlib/issues/107
Created a pull request to add types for it: https://github.com/DefinitelyTyped/DefinitelyTyped/pull/54433