{% macro singleSparkline(sparkline, allMetricsDocumentation) %}
{% if sparkline.url %}{{ sparkline(sparkline.url)|raw }}{% endif %} {% for metric in sparkline.metrics %} {% if '%s' in metric.description -%} {{ metric.description|translate(""~metric.value~"")|raw }} {%- else %} {{ metric.value }} {{ metric.description }} {%- endif %}{% if not loop.last %}, {% endif %} {% endfor %} {% if sparkline.evolution is defined %} {% set evolutionPretty = sparkline.evolution.percent %} {% if sparkline.evolution.percent < 0 %} {% set evolutionClass = 'negative-evolution' %} {% set evolutionIcon = 'arrow_down.png' %} {% elseif sparkline.evolution.percent == 0 %} {% set evolutionClass = 'neutral-evolution' %} {% set evolutionIcon = 'stop.png' %} {% else %} {% set evolutionClass = 'positive-evolution' %} {% set evolutionIcon = 'arrow_up.png' %} {% set evolutionPretty = '+' ~ sparkline.evolution.percent %} {% endif %} {{ evolutionPretty }} {% endif %}
{% endmacro %}