diff --git a/src/lib/components/CompletionSparkline.svelte b/src/lib/components/CompletionSparkline.svelte new file mode 100644 index 0000000..ca72bdc --- /dev/null +++ b/src/lib/components/CompletionSparkline.svelte @@ -0,0 +1,59 @@ + + +{#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} + + {/each} + +{/if}