{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "ex-heatmap-chart",
  "registryDependencies": [
    "@evilcharts/recharts-heatmap-chart"
  ],
  "files": [
    {
      "path": "src/registry/examples/recharts/ex-heatmap-chart.tsx",
      "content": "\"use client\";\n\nimport {\n  EvilHeatmapChart,\n  type ChartConfig,\n  type HeatmapDatum,\n} from \"@/registry/charts/recharts-heatmap-chart\";\n\n// A year of daily contributions, seeded so the docs render the same picture every time.\nfunction buildContributions(seed: number): HeatmapDatum[] {\n  let state = seed;\n  const random = () => {\n    state = (state * 1664525 + 1013904223) % 4294967296;\n    return state / 4294967296;\n  };\n  const end = Date.UTC(2025, 11, 31);\n  const data: HeatmapDatum[] = [];\n  for (let i = 364; i >= 0; i--) {\n    const day = new Date(end - i * 86_400_000);\n    const weekend = day.getUTCDay() === 0 || day.getUTCDay() === 6;\n    const active = random() < (weekend ? 0.3 : 0.8);\n    if (!active) continue;\n    const value = Math.round(random() * (weekend ? 6 : 14)) + 1;\n    data.push({ date: day.toISOString().slice(0, 10), value });\n  }\n  return data;\n}\n\nconst data = buildContributions(7);\n\nconst chartConfig = {\n  contributions: {\n    label: \"Contributions\",\n    colors: {\n      light: [\"#9be9a8\", \"#40c463\", \"#30a14e\", \"#216e39\"],\n      dark: [\"#0e4429\", \"#006d32\", \"#26a641\", \"#39d353\"],\n    },\n  },\n} satisfies ChartConfig;\n\nexport function EvilExampleHeatmapChart() {\n  return (\n    <EvilHeatmapChart className=\"h-full w-full p-4\" data={data} config={chartConfig}>\n      <EvilHeatmapChart.Cell dataKey=\"contributions\" />\n      <EvilHeatmapChart.MonthLabel />\n      <EvilHeatmapChart.DayLabel />\n      <EvilHeatmapChart.Tooltip />\n      <EvilHeatmapChart.Legend />\n    </EvilHeatmapChart>\n  );\n}\n",
      "type": "registry:block"
    }
  ],
  "type": "registry:block"
}