{#- HDR supervision track record, driven by `criteria.supervision` in data/criteria.yaml. One column per cohort; each column draws `n` markers (so the count is legible at a glance) plus a label and sub-label, and the outcome cards underneath grow to fit their wrapped text. Column widths, marker spacing and canvas height are all computed — add / remove / reorder cohorts and outcomes freely and never edit the SVG. `shape` is one of filled | open | square | diamond. -#} {%- set sv = criteria.supervision -%} {%- set X0 = 15 -%}{%- set X1 = 705 -%}{%- set W = X1 - X0 -%} {%- set groups = sv.groups or [] -%} {%- set ng = groups | length -%} {%- set COL_W = W / ng -%} {%- set SPACING = sv.marker_spacing | default(18) -%} {%- set MY = 27 -%} {%- set COL_BOTTOM = 64 -%} {%- set OUT_TOP = COL_BOTTOM + 10 -%} {%- set OUT_GAP = 10 -%} {%- set nout = sv.outcomes | length if sv.outcomes else 0 -%} {%- set OUT_W = (W - (nout - 1) * OUT_GAP) / nout if nout else W -%} {%- set OUT_WRAP = sv.outcome_wrap | default(64) -%} {%- set OUT_LH = 10.5 -%} {%- set nso = namespace(max_lines=1) -%} {%- for o in (sv.outcomes or []) -%} {%- set ol = (o | wordwrap(OUT_WRAP, break_long_words=False)).split('\n') -%} {%- if ol | length > nso.max_lines -%}{%- set nso.max_lines = ol | length -%}{%- endif -%} {%- endfor -%} {%- set OUT_H = 12 + nso.max_lines * OUT_LH + 8 -%} {%- set height = (OUT_TOP + OUT_H + 6) if nout else (COL_BOTTOM + 6) -%}

{{ sv.caption }}

{%- for g in groups %} {%- set cc = X0 + loop.index0 * COL_W + COL_W / 2 %} {%- set start = cc - (g.n - 1) * SPACING / 2 %} {%- if not loop.first %} {%- endif %} {{ g.title or (g.n ~ ' — ' ~ g.label) }} {%- for i in range(g.n) %} {%- set mx = start + i * SPACING %} {%- if g.shape == 'open' %} {%- elif g.shape == 'square' %} {%- elif g.shape == 'diamond' %} {%- else %} {%- endif %} {%- endfor %} {{ g.n }} — {{ g.label }} {%- if g.sub %} {{ g.sub }} {%- endif %} {%- endfor %} {%- for o in (sv.outcomes or []) %} {%- set ox = X0 + loop.index0 * (OUT_W + OUT_GAP) %} {%- set ol = (o | wordwrap(OUT_WRAP, break_long_words=False)).split('\n') %} {%- for line in ol %}{{ line }}{%- endfor %} {%- endfor %}