Replies: 1 comment
-
I found this: https://github.com/pipefunc/graphviz-anywidget |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
We have a number of issues about improving graph visualisation:
While not all of them require an interactive graph, I think all would benefit from interactivity. I dug around a bit to look for existing solutions. Unfortunately, I couldn't find anything that fits our needs out of the box.
As I see it, there are 3 ways to make interactive graphs:
Number (1) might be the simplest with the fewest changes to our current system. But it may also be the most difficulty to make interactive. Number (3) would give the best UX, especially in our static docs.
Layout
There are several good graph layout libraries out there. But the majority are optimised for undirected graphs. E.g.,
When it comes to directed (acyclic) graphs, we have
Dagre is JS and has plugins for Cytoscape (https://github.com/cytoscape/cytoscape.js-dagre) and a couple of other libraries. But it has not been actively maintained in years.
Graphviz still has the best algorithms as far as I can tell. But it is difficult to integrate with other libraries. If we want to use a different rendering framework, we have to produce a file with the graph layout and parse that ourselves. Graphviz has been compiled to WASM and is available through https://github.com/mdaines/viz-js. So we can use it in all 3 scenarios.
Rendering
There are a bunch of options:
When it comes to our group nodes, we are probably limited to Graphviz and D3/manual rendering.
Widgets
I tried out a couple of the above options using anywidget. This works nicely, esp. thanks to its hot reloading support.
Beta Was this translation helpful? Give feedback.
All reactions