{#- 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 }}