(
() => ({
value: { label: metricLabel, color: stroke },
}),
[metricLabel, stroke],
)
if (points.length < 2) return null
const margin = compact ? MARGIN_COMPACT : MARGIN_ROOMY
const tooltip = renderMiniTooltip(chart, compact, height)
const isSparkline = chart.kind === "sparkline"
return (
{isSparkline
? renderSparkline({ data, margin, gradientId, compact, metricLabel, tooltip })
: renderBars({ data, margin, compact, metricLabel, tooltip })}
)
}