Move the GraphVisualization wrapper#275
Conversation
There was a problem hiding this comment.
Thanks for your PR!
I think we can reduce the breaking changes a bit.
Couple of suggestions and questions. For the python parts, I can also try to apply some of them.
I would also put a link to https://storybook-components-build.appspot.com/?path=/story/components-graph-visualization--default for reference in the graph-widget.tsx file.
I think before merging the PR, we should change:
[x] default coloring changed (fixable by setting the color in python if not set initially)
[x] Zoom in/out button missing (fixable) -- EDIT: i just didnt see the buttons
[x] Fix hierarchical layout
[x] Set correct caption on the node
On the zoom in/out, i dont get yet why the storybook example has the buttons but its not referenced in the code
Co-authored-by: Florentin Dörre <florentin@owitsch.de>
updating notebook outputs as well. and documenting new default coloring + how to switch back. for nodes_2025_demo.ipynb made the movies dataset setup also inlined
c8a5a24 to
42ff701
Compare
* update example outputs * smaller python code cleanup * replace example graph
I found that using anywidget makes the interaction with React /javascript much cleaner and less hacky. To avoid breaking the public API, render is still there return creating HTML, which i implemented by creating a tiny anywidget wrapper in plain html
I also added a new render_widget is there as a new alternative for 2 way data binding with the visualisation, as well as a GraphWidget export.
The PR is quite large 😅 and I've annotated best I can where I'm uncertain.
There's some open questions that'd be good to discuss:
python-wrapper&js-applet) It seem cleaner & simpler to me, but it was a bigger change than what I wanted to do without discussing it first