{#if visible && rows.length > 0} {#snippet tools()} Typical: median of {MONTHS} months {/snippet} {#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} {/each}
Currency Spent Typical Difference
{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}