Cohort Retention

Weekly cohort grid where each cell's opacity scales with the retention percentage in the tone color.

Retention
W0W1W2W3W4
W0
100
64
48
41
38
W1
100
71
55
46
W2
100
68
52
W3
100
74

Requires shadcn/ui initialized. Run npx shadcn@latest init if you haven't.

Import & use
import { Dashboard12 } from "@/components/beste/piece/dashboard12";

<Dashboard12
  heading="Retention"
  cohorts={[
    "W0",
    "W1",
    "W2",
    "W3"
  ]}
  weeks={[
    "W0",
    "W1",
    "W2",
    "W3",
    "W4"
  ]}
  retention={[
    [
      100,
      64,
      48,
      41,
      38
    ],
    [
      100,
      71,
      55,
      46,
      0
    ],
    [
      100,
      68,
      52,
      0,
      0
    ],
    [
      100,
      74,
      0,
      0,
      0
    ]
  ]}
  tone="violet"
/>