yWorks / yfiles-jupyter-graphs

The home of the Jupyter notebook graph visualization widget powered by yFiles for HTML
https://www.yworks.com/products/yfiles-graphs-for-jupyter
Other
133 stars 14 forks source link

Feature Request: Widget Column Binding #22

Closed pleonova closed 1 year ago

pleonova commented 1 year ago

Is it possible to do the column binding that Sebastian mentioned in this video in the Python widget? Neo4j Live: Easy Graph Visualisations for Data Scientists with yworks https://youtu.be/Kb6ZiXuq2eE?t=3519

I work with a lot of hierarchical data, where the nodes have properties about the level in the taxonomy that I would love to be able to visualize via the hierarchical view. In the video, Sebastion does this in the developer mode, is this something that can be achieved in the widget with the /node_position_mapping? https://github.com/yWorks/yfiles-jupyter-graphs/blob/main/examples/node_position_mapping.ipynb

Thank you!

fskpf commented 1 year ago

Sorry for the late response.

The node_position_mapping in the Jupyter widget is quite different from the grid/row binding in the App-Generator.

With the node_position_mapping you can set the exact coordinates for each node. These coordinates are then used as initial positions. However, note that layouts other than the orthogonal_edge_router and organic_edge_router re-arranged all nodes. So if another layout is predefined (see set_graph_layout), then those positions will be overwritten by the automatic layout arrangement.

On the other hand, the grid/row binding in the App-Generator shows a feature of the automatic layouts like yFiles' HierarchicLayout or OrganicLayout. Basically, it configures the layout to respect the additional grid constraints, while still providing an automatic placement for the nodes/edges.

Although the yFiles layout algorithms are capable of such features, we want to keep the layout options in the Jupyter widget simple and easy to use. For more options, you can always export the graph to yEd Live (see the toolbar button in the Jupyter widget) and use the options there (though it also doesn't offer this row/column grid feature, but many other layout settings to fine-tune the automatic arrangement).

There are currently no plans to add fine-granular layout settings, though we may add some more non-configurable layout styles in the future.

Apart from these free applications, there is also the commercial diagramming SDK yFiles which provides the full package of options (much more than is showcased in these free apps). So you could easily implement a similar and/or more specifically tailored app for your use case.