{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "ex-year-range-echarts-heatmap-chart",
  "registryDependencies": [
    "@evilcharts/echarts-heatmap-chart"
  ],
  "files": [
    {
      "path": "src/registry/examples/echarts/ex-year-range-echarts-heatmap-chart.tsx",
      "content": "\"use client\";\n\nimport {\n  EChartsHeatmapChart,\n  type ChartConfig,\n  type HeatmapDatum,\n} from \"@/registry/charts/echarts-heatmap-chart\";\n\n// Deploys per day across a calendar year, busier in the second half.\nfunction buildDeploys(seed: number): HeatmapDatum[] {\n  let state = seed;\n  const random = () => {\n    state = (state * 1664525 + 1013904223) % 4294967296;\n    return state / 4294967296;\n  };\n  const data: HeatmapDatum[] = [];\n  for (let month = 0; month < 12; month++) {\n    const days = new Date(Date.UTC(2025, month + 1, 0)).getUTCDate();\n    for (let day = 1; day <= days; day++) {\n      const date = new Date(Date.UTC(2025, month, day));\n      if (date.getUTCDay() === 0 || date.getUTCDay() === 6) continue;\n      if (random() >= 0.4 + month * 0.04) continue;\n      data.push({\n        date: date.toISOString().slice(0, 10),\n        value: Math.ceil(random() * (2 + month)),\n      });\n    }\n  }\n  return data;\n}\n\nconst data = buildDeploys(41);\n\nconst chartConfig = {\n  deploys: {\n    label: \"Deploys\",\n    colors: {\n      light: [\"#e9d5ff\", \"#c084fc\", \"#9333ea\", \"#581c87\"],\n      dark: [\"#3b0764\", \"#6b21a8\", \"#a855f7\", \"#e9d5ff\"],\n    },\n  },\n} satisfies ChartConfig;\n\nexport function EChartsExampleHeatmapChart() {\n  return (\n    <EChartsHeatmapChart\n      className=\"h-full w-full p-4\"\n      data={data}\n      config={chartConfig}\n      range={2025} // [!code highlight]\n      scale=\"linear\" // [!code highlight]\n    >\n      <EChartsHeatmapChart.Cell dataKey=\"deploys\" />\n      <EChartsHeatmapChart.MonthLabel />\n      <EChartsHeatmapChart.DayLabel />\n      <EChartsHeatmapChart.Tooltip />\n      <EChartsHeatmapChart.Legend align=\"left\" />\n    </EChartsHeatmapChart>\n  );\n}\n",
      "type": "registry:block"
    }
  ],
  "type": "registry:block"
}