{% for hour_data in chart_data %} {% set ratio = loop.index0 / ((chart_data|length - 1) if (chart_data|length - 1) > 0 else 1) %} {% if ratio < 0.3333 %} {% set local_ratio = ratio / 0.3333 %} {% set top_red = (210 + local_ratio * 45)|round|int %} {% set top_green = (225 + local_ratio * 15)|round|int %} {% set top_blue = (255 - local_ratio * 25)|round|int %} {% set bottom_red = (170 + local_ratio * 85)|round|int %} {% set bottom_green = (190 - local_ratio * 5)|round|int %} {% set bottom_blue = (255 - local_ratio * 55)|round|int %} {% elif ratio < 0.6666 %} {% set local_ratio = (ratio - 0.3333) / 0.3333 %} {% set top_red = (255 - local_ratio * 20)|round|int %} {% set top_green = (240 + local_ratio * 15)|round|int %} {% set top_blue = (230 + local_ratio * 10)|round|int %} {% set bottom_red = (255 - local_ratio * 105)|round|int %} {% set bottom_green = (185 + local_ratio * 45)|round|int %} {% set bottom_blue = 200 %} {% else %} {% set local_ratio = (ratio - 0.6666) / 0.3334 %} {% set top_red = (235 - local_ratio * 25)|round|int %} {% set top_green = (255 - local_ratio * 30)|round|int %} {% set top_blue = (240 + local_ratio * 15)|round|int %} {% set bottom_red = (150 + local_ratio * 20)|round|int %} {% set bottom_green = (230 - local_ratio * 40)|round|int %} {% set bottom_blue = (200 + local_ratio * 55)|round|int %} {% endif %} {% set count_red = (bottom_red * 0.7)|round|int %} {% set count_green = (bottom_green * 0.7)|round|int %} {% set count_blue = (bottom_blue * 0.7)|round|int %}
{{hour_data.count}}
{{hour_data.hour}}
{% endfor %}