{% set max_abs = (monthly_pl|map(attribute='net_pl')|map('abs')|max) if monthly_pl else 0 %}
{{ selected_year }} — monthly realized P&L {% if event_count %}· {{ event_count }} event{{ '' if event_count == 1 else 's' }} YTD{% endif %}
{% for m in monthly_pl %} {% if max_abs and m.net_pl != 0 %} {% set height_pct = ((m.net_pl|abs) / max_abs * 100)|round(1) %} {% else %} {% set height_pct = 0 %} {% endif %}
{% endfor %}
{% for label in ["J","F","M","A","M","J","J","A","S","O","N","D"] %}
{{ label }}
{% endfor %}