Skip to content

Commit 98e2599

Browse files
committed
deps, versioning, etc for dashboard
1 parent 02eee05 commit 98e2599

4 files changed

Lines changed: 281 additions & 244 deletions

File tree

packages/dashboard/app/components/ui/sparkline.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export function Sparkline ({
3535

3636
const min = Math.min(...data)
3737
const max = Math.max(...data)
38-
const span = max - min || 1
38+
const span = max - min
3939
const n = data.length
4040

4141
const x = (i: number) => (n === 1 ? width / 2 : pad + (i / (n - 1)) * innerW)
@@ -44,13 +44,12 @@ export function Sparkline ({
4444

4545
const points = data.map((v, i) => `${x(i).toFixed(2)},${y(v).toFixed(2)}`).join(' ')
4646

47-
// max-w-full keeps the fixed-width SVG from spilling out of a narrower container (e.g. a stat card).
48-
4947
return (
5048
<svg
5149
width={width}
5250
height={height}
5351
viewBox={`0 0 ${width} ${height}`}
52+
// max-w-full keeps the fixed-width SVG from spilling out of a narrower container (e.g. a stat card).
5453
className={cn('max-w-full overflow-visible', className)}
5554
role="img"
5655
aria-label={ariaLabel}

0 commit comments

Comments
 (0)