From a88226778e4b961d6011c83ac5ee99c34ecd1b5f Mon Sep 17 00:00:00 2001 From: Ethanfel Date: Tue, 3 Feb 2026 14:06:57 +0100 Subject: [PATCH] Center vertical timeline graph Co-Authored-By: Claude Opus 4.5 --- tab_timeline.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/tab_timeline.py b/tab_timeline.py index 997f0ad..4f3c903 100644 --- a/tab_timeline.py +++ b/tab_timeline.py @@ -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}")