Center vertical timeline graph

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-02-03 14:06:57 +01:00
parent 94dbbc694f
commit a88226778e

View File

@@ -36,9 +36,13 @@ def render_timeline_tab(data, file_path):
direction = "LR" if view_mode == "🌳 Horizontal" else "TB"
try:
graph_dot = htree.generate_graph(direction=direction)
# Vertical mode: don't stretch to container width (keeps nodes small)
use_full_width = (direction == "LR")
st.graphviz_chart(graph_dot, use_container_width=use_full_width)
if direction == "LR":
st.graphviz_chart(graph_dot, use_container_width=True)
else:
# Vertical mode: center the graph
_, col_center, _ = st.columns([1, 2, 1])
with col_center:
st.graphviz_chart(graph_dot, use_container_width=True)
except Exception as e:
st.error(f"Graph Error: {e}")