{#- Scholarly & research-activity panel, driven by `criteria.scholarly` in data/criteria.yaml. `funding.bars` widths are computed automatically from each bar's `value` as a share of the bars' total, so you only edit numbers/labels here. -#} {%- set sm = criteria.scholarly -%} {%- set fd = sm.funding -%} {%- set total = fd.bars | sum(attribute='value') -%} {%- set X0 = 15 -%}{%- set X1 = 705 -%}{%- set W = X1 - X0 -%}{%- set gap = 2 -%}

{{ fd.caption }}

{%- set ns = namespace(cum=0) %} {%- for b in fd.bars %} {%- set x0 = (X0 + ns.cum / total * W) -%} {%- set ns.cum = ns.cum + b.value -%} {%- set x1 = (X0 + ns.cum / total * W) -%} {%- set w = (x1 - x0) - (0 if loop.last else gap) %} {{ b.title }} {%- endfor %} {%- set ns2 = namespace(cum=0) %} {%- for b in fd.bars %} {%- set x0 = (X0 + ns2.cum / total * W) -%} {%- set ns2.cum = ns2.cum + b.value -%} {%- set x1 = (X0 + ns2.cum / total * W) -%} {%- set cx = ((x0 + x1) / 2) | round(1) %} A${{ '%g' | format(b.value) }}M — {{ b.label }} {%- endfor %}