{# Cards side by side (missing values): every diagram is visible at once. The count chart is drawn as a ranked list of bars. #}
{% for item in items %} {% set key = item.content.get('anchor_id', '') %}
{% if key == 'bar' and counts %}

Count by variable

{% set n_sets = counts[0]['values'] | length %} {% if n_sets > 1 %}
{% for label in labels[:n_sets] %} {{ label }} {% endfor %}
{% endif %} {% set top = [counts[0]['values'] | map(attribute='share') | max, 0.0001] | max %} {% else %}

{% if key == 'matrix' %}Where values are missing{% elif key == 'heatmap' %}Missing together{% else %}{{ item.name }}{% endif %}

{{ item.render() }} {% endif %}
{% endfor %}