Spaces:
Running
Running
Update timeline_generator.py
Browse files- timeline_generator.py +4 -4
timeline_generator.py
CHANGED
|
@@ -56,9 +56,9 @@ def generate_timeline_diagram(json_input: str, output_format: str) -> str:
|
|
| 56 |
'rankdir': 'TB', # Top-to-Bottom for better control
|
| 57 |
'splines': 'ortho', # Straight lines with 90-degree bends
|
| 58 |
'bgcolor': 'white', # White background
|
| 59 |
-
'pad': '0.
|
| 60 |
-
'nodesep': '
|
| 61 |
-
'ranksep': '
|
| 62 |
}
|
| 63 |
)
|
| 64 |
|
|
@@ -132,7 +132,7 @@ def generate_timeline_diagram(json_input: str, output_format: str) -> str:
|
|
| 132 |
fontsize='12',
|
| 133 |
width='2.5',
|
| 134 |
height='1.2',
|
| 135 |
-
pos=f"{visual_col *
|
| 136 |
)
|
| 137 |
|
| 138 |
# Connect events in chronological order (1→2→3→4...)
|
|
|
|
| 56 |
'rankdir': 'TB', # Top-to-Bottom for better control
|
| 57 |
'splines': 'ortho', # Straight lines with 90-degree bends
|
| 58 |
'bgcolor': 'white', # White background
|
| 59 |
+
'pad': '0.8', # Padding around the graph
|
| 60 |
+
'nodesep': '3.0', # Increased spacing between nodes horizontally
|
| 61 |
+
'ranksep': '2.5' # Increased spacing between ranks vertically
|
| 62 |
}
|
| 63 |
)
|
| 64 |
|
|
|
|
| 132 |
fontsize='12',
|
| 133 |
width='2.5',
|
| 134 |
height='1.2',
|
| 135 |
+
pos=f"{visual_col * 4.5},{-row * 3}!" # Increased spacing for serpentine layout
|
| 136 |
)
|
| 137 |
|
| 138 |
# Connect events in chronological order (1→2→3→4...)
|