{# A trend: how many rows arrived per day. Drawn by the server, as an SVG path and a handful of ``s. No charting library, no canvas and no second request -- the chart is in the first paint, it inherits the theme's own colours, it prints, and it survives script being off. The tooltips are the only part script adds, and a tooltip is not how anyone reads a trend. The plot carries no text. The SVG is stretched to the card's width, which would stretch any `` in it with everything else, so the labels are HTML laid over and under the box instead -- where they also wrap, translate and inherit the page's own type. #} {% set card = card.context %} {% set series = card.series %}

{{ _(card.title) }}

{{ _("Last {days} days", days=series.bars|length) }}

{% if card.url %} {{ _("View all") }} {{ ff_icon("arrow-right", size=14) }} {% endif %}
{# An all-zero window draws a flat rule along the baseline, which is the same picture a chart that failed to render produces -- and on a new install that is the very first thing the dashboard shows. So it says so instead, and keeps the window's length in the sentence: "nothing in 7 days" is a fact about the data, where an empty chart is a doubt about the software. #} {% if series.empty %}
{{ _("Nothing in the last {days} days", days=series.bars|length) }}

{{ _("Rows will appear here as they arrive.") }}

{% else %}
{{ series.total }} {% include "dashboard/_delta.html" %}
{# `role="img"` with a label, because the shape means nothing read point by point. The table at the foot carries the same numbers exactly, and is what a screen reader is offered instead. #}
{{ _("Total") }}
{{ series.total }}
{{ _("Per day") }}
{{ series.average }}
{% if series.best and series.best.count %}
{{ _("Busiest") }}
{{ series.best.iso }} · {{ series.best.count }}
{% endif %}
{# The clip goes on the wrapper, never on the table: a table treats `height` as a minimum and stays full size, and an invisible full-size box is still part of the page's scrollable overflow. #}
{% for bar in series.bars %} {% endfor %}
{{ _(card.title) }}
{{ _("Date") }}{{ _("Count") }}
{{ bar.iso }}{{ bar.count }}
{% endif %}