{% else %}
{% set max_v = points|map(attribute='cumulative_realized')|map('float')|max %}
{% set min_v = points|map(attribute='cumulative_realized')|map('float')|min %}
{# Include the present-day unrealized in the y-extent so the dot fits on screen. #}
{% if points[-1].unrealized is not none %}
{% set with_unr = (points[-1].cumulative_realized|float + points[-1].unrealized|float) %}
{% if with_unr > max_v %}{% set max_v = with_unr %}{% endif %}
{% if with_unr < min_v %}{% set min_v = with_unr %}{% endif %}
{% endif %}
{# Pad the y-extent by 8% so the line/dot don't kiss the edge. Always include zero. #}
{% if min_v > 0 %}{% set min_v = 0 %}{% endif %}
{% if max_v < 0 %}{% set max_v = 0 %}{% endif %}
{% set raw_span = max_v - min_v %}
{% if raw_span <= 0 %}{% set raw_span = 1.0 %}{% endif %}
{% set pad = raw_span * 0.08 %}
{% set y_min = min_v - pad %}
{% set y_max = max_v + pad %}
{% set y_span = y_max - y_min %}
{# SVG geometry. Padding leaves room for axis labels. #}
{% set vw = 320 %}
{% set vh = 160 %}
{% set pl = 44 %}{# left axis label gutter #}
{% set pr = 8 %}
{% set pt = 8 %}
{% set pb = 18 %}{# bottom month-axis gutter #}
{% set iw = vw - pl - pr %}
{% set ih = vh - pt - pb %}
{% set y_ticks = [0, 0.25, 0.5, 0.75, 1.0] %}
Line: cumulative realized · Dot: + present-day unrealized · hover any point