{# Bullet chart for a Plan row. Inputs: r (PlanRow). Reuses the existing color rule from the flat bar: pct == 0 → info, 0 < pct < 95 → warn, 95 ≤ pct ≤ 105 → pos, pct > 105 → neg. Tooltip: native title= with target / current / gap dollars. #} {% if r.pct_filled is not none %} {% set pct = r.pct_filled|float %} {% if pct == 0 %} {% set color = 'var(--color-info)' %} {% elif pct < 95 %} {% set color = 'var(--color-warn)' %} {% elif pct <= 105 %} {% set color = 'var(--color-pos)' %} {% else %} {% set color = 'var(--color-neg)' %} {% endif %} {% set tip %} Target: ${{ "%.2f"|format(r.target_dollar_equiv|float) if r.target_dollar_equiv else '—' }} · Current: ${{ "%.2f"|format(r.current_dollar|float) }} · Gap: {% if r.gap_dollar > 0 %}+{% endif %}${{ "%.2f"|format(r.gap_dollar|float) }} {% endset %}
{% if pct > 100 %}
{% else %}
{% endif %}
{{ "%.0f"|format(pct) }}%
{% else %} {% endif %}