{% set fill = "#2ca02c" %} {% set stroke = "#2ca02c" %} {% set stroke_width = 4 %} {% set margin = 2 %} {% macro path(data_points, vb_height) %} {% for value, position, message in data_points %} {% set x = (position * vb_width)+margin %} {% set y = (vb_height - value)+margin %} {% if loop.first %}M{{ x }} {{ y }}{% else %} L{{ x }} {{ y }}{% endif %} {% endfor %} {% endmacro %} {% macro path_best_fit(best_fit_points, vb_height) %} {% for value, position in best_fit_points %} {% set x = (position * vb_width)+margin %} {% set y = (vb_height - value)+margin %} {% if loop.first %}M{{ x }} {{ y }}{% else %} L{{ x }} {{ y }}{% endif %} {% endfor %} {% endmacro %} {% macro circles(data_points, vb_height) %} {% for value, position, message in data_points %} {% set x = (position * vb_width)+margin %} {% set y = (vb_height - value)+margin %} {% endfor %} {% endmacro %} {% macro random_int() %}{% for n in [0,1,2,3,4,5] %}{{ [0,1,2,3,4,5,6,7,8,9]|random }}{% endfor %}{% endmacro %} {% set parts = [random_int()] %} {% set unique_id = parts|join('-') %}
{{ circles(data_points, vb_height) }}