In svg graph, set fill-opacity to 0% on parent<g/> instead of each child instance of <rect/>. This reduces generated file size 12.6KB - 11.9KB

This commit is contained in:
Peter Stockings
2023-12-09 21:33:30 +11:00
parent 06844fa5b0
commit 7ae7bda42d

View File

@@ -55,6 +55,7 @@
</g> </g>
{% endfor %} {% endfor %}
<g style="fill-opacity: 0%">
{% for pos, message in plot_labels %} {% for pos, message in plot_labels %}
{% set x = (pos * vb_width) - (stroke_width/2) + margin %} {% set x = (pos * vb_width) - (stroke_width/2) + margin %}
{% set y = 0 %} {% set y = 0 %}
@@ -66,9 +67,9 @@
width="{{ width | int }}" width="{{ width | int }}"
height="{{ height | int }}" height="{{ height | int }}"
class="plot_point" class="plot_point"
data-message="{{ message }}" data-message="{{ message }}"></rect>
fill-opacity="0%"></rect>
{% endfor %} {% endfor %}
</g>
{% for pos in relative_positions %} {% for pos in relative_positions %}
{% endfor %} {% endfor %}