Add missing round to svg sparkline graph

This commit is contained in:
Peter Stockings
2023-12-09 20:55:17 +11:00
parent f9b3854544
commit c4a4af6307

View File

@@ -57,11 +57,15 @@
{% endfor %} {% endfor %}
{% for pos, message in plot_labels %} {% for pos, message in plot_labels %}
<rect {% set x = (pos * vb_width) - (stroke_width/2) + margin %}
x="{{ (pos * vb_width) - (stroke_width/2) + margin }}" {% set y = 0 %}
y="{{ 0 }}" {% set width = stroke_width %}
width="{{ stroke_width }}" {% set height = vb_height + margin %}
height="{{ vb_height + margin }}" <rect
x="{{ x | round(precision) }}"
y="{{ y | round(precision) }}"
width="{{ width | round(precision) }}"
height="{{ height | round(precision) }}"
class="plot_point" class="plot_point"
data-message="{{ message }}" data-message="{{ message }}"
fill-opacity="0%"></rect> fill-opacity="0%"></rect>