From d98cee8015adbf9866ae29e6bc53ec8c709968f0 Mon Sep 17 00:00:00 2001 From: Ethanfel Date: Sat, 28 Feb 2026 00:11:03 +0100 Subject: [PATCH] Fix timeline graph height: remove invalid SVG height="auto" Drop the fixed height attribute entirely instead of setting it to "auto", which SVGs don't support. The viewBox attribute handles proportional scaling when only width="100%" is set. Co-Authored-By: Claude Opus 4.6 --- tab_timeline_ng.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tab_timeline_ng.py b/tab_timeline_ng.py index 61cf383..6804461 100644 --- a/tab_timeline_ng.py +++ b/tab_timeline_ng.py @@ -428,9 +428,10 @@ def _render_graphviz(dot_source: str, selected_node_id: str | None = None): src = graphviz.Source(dot_source) svg = src.pipe(format='svg').decode('utf-8') - # (a) Responsive SVG sizing — replace fixed width/height with 100% + # (a) Responsive SVG sizing — fill container width, remove fixed height + # so the SVG scales proportionally via its viewBox attribute svg = re.sub(r'\bwidth="[^"]*"', 'width="100%"', svg, count=1) - svg = re.sub(r'\bheight="[^"]*"', 'height="auto"', svg, count=1) + svg = re.sub(r'\s*height="[^"]*"', '', svg, count=1) container_id = f'graph-{id(dot_source)}' html_content = (