{#if hasAnyCompletion} {#each data as d, i} {@const x = i * (barWidth + BAR_GAP)} {@const proportion = d.count / maxCount} {@const barHeight = Math.max(1, Math.round(proportion * height))} {@const y = height - barHeight} {d.day}: {d.count} {d.count === 1 ? "task" : "tasks"} {/each} {/if}