Spaces:
Runtime error
Runtime error
display directed graph
Browse files
py_code_analyzer/imports_graph_visualizer.py
CHANGED
@@ -7,10 +7,11 @@ class ImportsGraphVisualizer:
|
|
7 |
def visualize(
|
8 |
cls,
|
9 |
imports_graph: nx.Graph,
|
|
|
10 |
width: int = 100,
|
11 |
height: int = 100,
|
12 |
display_html_name: str = "nx.html",
|
13 |
):
|
14 |
-
_pyvis_network = Network(f"{width}%", f"{height}%")
|
15 |
_pyvis_network.from_nx(imports_graph)
|
16 |
_pyvis_network.show(display_html_name)
|
|
|
7 |
def visualize(
|
8 |
cls,
|
9 |
imports_graph: nx.Graph,
|
10 |
+
directed: bool = True,
|
11 |
width: int = 100,
|
12 |
height: int = 100,
|
13 |
display_html_name: str = "nx.html",
|
14 |
):
|
15 |
+
_pyvis_network = Network(f"{width}%", f"{height}%", directed=directed)
|
16 |
_pyvis_network.from_nx(imports_graph)
|
17 |
_pyvis_network.show(display_html_name)
|