Files
1article/viz.py
T
2024-12-14 02:57:31 -05:00

23 lines
431 B
Python

from dash import Dash, html
from pprint import pprint
import dash_cytoscape as cyto
import json
app = Dash(__name__)
with open('viz_data.json') as f:
data = json.load(f)
app.layout = html.Div([
html.P("Dash Cytoscape:"),
cyto.Cytoscape(
id='cytoscape',
elements=data,
layout={'name': 'breadthfirst'},
style={'width': '400px', 'height': '500px'}
)
])
app.run_server(debug=True)