{% macro meter(value, total) -%} {%- set share = [value / total, 1] | min if total else 0 -%} {%- endmacro %} {% macro percent(value, total) -%} {{ '%.0f' | format(100 * value / total) if total else '—' }}% {%- endmacro %}