Feature Ideas: Fit Selection; Highlight connected nodes
GoodNovember opened this issue · 2 comments
Hi there! I adore this library, thank you for making it and maintaining it.
I'm currently using it to visualize all the internal links of a website so that we can discover things like where broken links tend to occur and visualize how much of our website is devoted to certain features, etc. Your library is hands-down the best I've used in terms of performance.
What would make my life so much easier would be the ability to highlight the immediate ancestors and descendants of a given node on click. Currently, when a single node is clicked, everything else gets "greyed-out". While I like this feature, it makes manually exploring the graph a pain in some circumstances, especially when I'd click (or miss-click, lol) on a node and I'd immediately lose where I was. Perhaps, a color / size change to emphasize that some other nodes are "related" to the currently selected one would help out here, but I'm unsure how to manage that with the current API.
Relatedly, I'd really like something like "fitView" but for "fitSelection" that references all the currently selected nodes and centers the viewport upon them. This would really be handy for a "search" feature that I'm working on that emphasizes the query's results.
In general, the ability to selectively show / hide / filter certain portions or categories of nodes would be hugely helpful as well.
Anyway, thanks for your consideration! Keep well!
Thanks for your feedback and comments @GoodNovember!
We find all of them reasonable and we will add them to our to do list. Filtering and showing / hiding the nodes will be a bit tricky to build so we're giving it a lower priority. In cosmograph.app we are handling that through data / config updates, which works pretty well. But when the number of nodes gets huge, the performance goes down quite noticeably.
@GoodNovember Version 1.1.3 now allows to select adjacent nodes: https://github.com/cosmograph-org/cosmos/releases/tag/1.1.3