Open ppakorn opened 2 years ago
You need to pass stylesheet
parameter in cyto.Cytoscape
:
stylesheet = [
{'selector': 'node', 'style': {'content': 'data(label)'}},
{'selector': 'edge',
'style': {'content': 'data(label)',
'curve-style': 'unbundled-bezier',
'width': 1,
'line-color': 'lightblue',
'target-arrow-color': 'lightblue',
'target-arrow-shape': 'triangle',
'text-margin-x': 0,
'font-size': 8}}]
Not sure if it supposed to be one-- and preferably only one --obvious way to do it though.
I followed the tutorial https://dash.plotly.com/cytoscape/elements, and the very first example of nodes and edges I saw
and expected that the edge should have 'Node 1 to 2' on it But it doesn't (image from the tutorial itself)
Full code of the example