{label}
{#if latest}
{formatMetric(metric, latest.y)}
{#if delta !== null}
{delta > 0 ? '▲' : delta < 0 ? '▼' : '•'} {Math.abs(delta).toFixed(1)}%
{/if}
{#if rangeDelta !== null}
{rangeDelta > 0 ? '▲' : rangeDelta < 0 ? '▼' : '•'} {Math.abs(rangeDelta).toFixed(1)}% over range
{/if}
{/if}
{#if allPoints.length === 0}
No data for current filters
{:else}
{
tip = null
highlight = null
}}
>
{#if tip}
{tip.name}
{tip.date}
{tip.value}
{#if tip.deltaText}
{tip.deltaText}
{/if}
{#if tip.commits}
@ {tip.commits}
{/if}
{/if}
{#each series as s (s.name)}
{@const last = s.points[s.points.length - 1]}
{@const prev = s.points[s.points.length - 2]}
{@const d = last && prev && prev.y !== 0 ? ((last.y - prev.y) / prev.y) * 100 : null}
(highlight = s.name)}
onmouseleave={() => (highlight = null)}
>
{s.name}
{#if last}
{formatMetric(metric, last.y)}
{#if d !== null}
0)}
class:bad={d !== 0 && (lowerIsBetter ? d > 0 : d < 0)}
>{d > 0 ? '▲' : d < 0 ? '▼' : '•'}{Math.abs(d).toFixed(1)}%
{/if}
{/if}
{/each}
{/if}