{#if visible && rows.length > 0}
{#each lines as r (r.code)}
{@const diff = r.typical === null ? null : r.spent - r.typical}
{@const scale = Math.max(r.spent, r.typical ?? 0) || 1}
Currency
Spent
Typical
Difference
Spent against typical
{/each}
{r.code}
{r.format(r.spent)}
{r.typical === null ? "n/a" : r.format(r.typical)}
{#if diff !== null}
{r.format(Math.abs(diff))}
{diff > 0 ? "over" : "under"}
{/if}
{#if r.typical !== null}