-
-
Notifications
You must be signed in to change notification settings - Fork 123
Expand file tree
/
Copy pathusage.py
More file actions
29 lines (26 loc) · 725 Bytes
/
usage.py
File metadata and controls
29 lines (26 loc) · 725 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import dash
import dash_cytoscape as cyto
from dash import html
app = dash.Dash(__name__)
server = app.server
app.layout = html.Div(
[
cyto.Cytoscape(
id="cytoscape",
elements=[
{
"data": {"id": "one", "label": "Node 1"},
"position": {"x": 50, "y": 50},
},
{
"data": {"id": "two", "label": "Node 2"},
"position": {"x": 200, "y": 200},
},
{"data": {"source": "one", "target": "two", "label": "1 to 2"}},
],
layout={"name": "preset"},
)
]
)
if __name__ == "__main__":
app.run(debug=True)