From 7ae7bda42d97ca8e59fcd256dc5f20c2d09fadb7 Mon Sep 17 00:00:00 2001 From: Peter Stockings Date: Sat, 9 Dec 2023 21:33:30 +1100 Subject: [PATCH] In svg graph, set fill-opacity to 0% on parent instead of each child instance of . This reduces generated file size 12.6KB - 11.9KB --- templates/partials/sparkline.html | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/templates/partials/sparkline.html b/templates/partials/sparkline.html index 45053ec..bb2ac75 100644 --- a/templates/partials/sparkline.html +++ b/templates/partials/sparkline.html @@ -55,6 +55,7 @@ {% endfor %} + {% for pos, message in plot_labels %} {% set x = (pos * vb_width) - (stroke_width/2) + margin %} {% set y = 0 %} @@ -66,9 +67,9 @@ width="{{ width | int }}" height="{{ height | int }}" class="plot_point" - data-message="{{ message }}" - fill-opacity="0%"> + data-message="{{ message }}"> {% endfor %} + {% for pos in relative_positions %} {% endfor %}