{#- A subject's series on the node that stands for it (ADR-0092 decision 6): the
curves of its measures, drawn on the server as SVG with no script of its own, and
its readings as a table. `_node_facts.html` shows the curves and the newest
`reading_cap` rows; the History page shows every row and no curve.
The geometry is `little_sister.curves`' — every number below is its, and this
only writes it down. What is drawn, and what says so in words:
* the value axis — a hairline per step, its reading on the left, and a free-text
unit once above them; a span unit names itself in every step instead;
* the line, broken wherever a reading had no value or nothing was read for
longer than the node's freshness tolerance, and a dot for a reading that stands
alone between two breaks and for the newest one;
* a reading without a value, marked at its instant in the lane beneath the
baseline — never as a zero — and counted beside the title with the mark as its
key; a hole is counted too, and has no mark of its own;
* the oldest and the newest time, in the configured zone and format;
* each reading's time and value where the pointer is: the plot is cut between
each two neighbors' midpoints, so the pointer finds a time, not a line.
`role="img"` keeps the per-reading titles from being read out one by one: the
table is the accessible twin, and the caption says what the drawing shows. -#}
{%- from '_status_cue.html' import status_cue %}
{%- macro summary(c) -%}
{%- if c.lowest -%}
newest {{ c.newest }} · lowest {{ c.lowest }} · highest {{ c.highest }}
{%- endif -%}
{%- if c.unvalued -%}
{%- if c.lowest %} · {% endif -%}
{{ c.unvalued }} without a value
{%- endif -%}
{%- if c.holes %} · {{ c.holes }} {{ "stretch" if c.holes == 1 else "stretches" }} without readings{% endif -%}
{%- endmacro %}
{%- macro curve(c) -%}
| Time | Status | {% for column in view.columns %}{{ column }} | {% endfor %}Reason |
|---|---|---|---|
| {% if row.code %}{{ status_cue(row.code, labeled=true) }}{% endif %} | {%- for column in view.columns %} {%- set field = row.fields.get(column) %}{% if field %}{% if field.kind == 'instant' %}{% else %}{{ field.text }}{% endif %}{% endif %} | {%- endfor %}{{ row.texts | join('; ') | markdown_inline }} |