"""
- f"
Name: {node.name[0:10]}
"
+ f"
Name: {node_show_name}
"
f"
Role: {node.role_desc.capitalize()}
"
f"
Value: {node.data}
"
f"
Data ID: {node.data_id}
"
@@ -935,10 +939,10 @@ def draw_interactive_html_graph(
net.add_node(
n_id=node.id,
- label=node.name[0:16],
+ label=node_show_name,
title=label,
color=node_colors.get(node.param_type, "gray"),
- url=f"{filepath}/{node.name}.html",
+ url=f"./{node.name}.html", # Relative path
)
node_ids.add(node.id)
@@ -976,6 +980,23 @@ def draw_interactive_html_graph(
display: block;
margin-top: 10px;
}
+ /* Simple styling for the legend */
+ #legend {
+ margin-top: 20px;
+ font-family: Arial, sans-serif;
+ font-size: 14px;
+ }
+ .legend-item {
+ margin-bottom: 5px;
+ }
+ .legend-color-box {
+ display: inline-block;
+ width: 12px;
+ height: 12px;
+ margin-right: 5px;
+ border: 1px solid #000;
+ vertical-align: middle;
+ }
@@ -983,6 +1004,35 @@ def draw_interactive_html_graph(
+
+