{# This snippet requires these variables: date_chart, schema, filters #} {% load eb dateutils humanize eb_filter %}

Peak of this chart: {{ date_chart.max_count|intcomma }} {% schema_plural_name schema date_chart.max_count %}

{% regroup date_chart.dates by date|date:"F" as dates_by_month %} {% for date in date_chart.dates %} {% endfor %} {% for date in date_chart.dates %} {% endfor %} {% for month in dates_by_month %} {% endfor %}
{% if date.count %} {{ date.count }} {% else %}   {% endif %}
{% if date.count %} {{ date.date.day }} {% else %} {{ date.date.day }} {% endif %}
{% if forloop.first and month.list|length|lessthan:"4" %} {# Don't display month name, because there's not enough space. #} {% else %} {% if forloop.last and month.list|length|lessthan:"4" %} {# Display abbreviated month name #} {{ month.list.0.date|date:"N" }} {% else %} {# Display full month name #} {{ month.list.0.date|date:"N Y" }} {% endif %} {% endif %}