AlrasheedA / st-link-analysis

A custom Streamlit component for link analysis, built with Cytoscape.js and Streamlit.
https://pypi.org/project/st-link-analysis/
MIT License
41 stars 3 forks source link

Display edge weights #27

Closed DavidWalz closed 1 week ago

DavidWalz commented 3 weeks ago

Is there a way to display edge weights?

The demo app shows how to display edge label groups. However I don't see a way to display the edge weight or other properties within in graph (only in the side bar when selecting individual edges). A workaround is to create an individual edge group for each value of an edge weight. Is this currently possible?

AlrasheedA commented 2 weeks ago

Unfortunately, there isn't a straightforward way to display edge weights directly on the graph, which reflecting back on now, is an oversight in the design of the EdgeStyle options.

I will be updating the EdgeStyle to include a caption parameter, similar to the NodeStyle parameter. This will allow you to choose any edge attribute, such as weight, to display as the edge label. It will be included in version 0.3.0.

Thank you for bringing this to my attention!

[EDIT: use caption instead of label as parameter name]

AlrasheedA commented 1 week ago