{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "ex-thresholds-echarts-heatmap-chart",
  "registryDependencies": [
    "@evilcharts/echarts-heatmap-chart"
  ],
  "files": [
    {
      "path": "src/registry/examples/echarts/ex-thresholds-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// Error-budget burn per day — mostly quiet, with the odd incident spike.\nfunction buildIncidents(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 roll = random();\n    if (roll < 0.45) continue;\n    const value = roll > 0.96 ? Math.ceil(random() * 40) + 10 : Math.ceil(random() * 5);\n    data.push({ date: new Date(end - i * 86_400_000).toISOString().slice(0, 10), value });\n  }\n  return data;\n}\n\nconst data = buildIncidents(19);\n\nconst chartConfig = {\n  errors: {\n    label: \"Errors\",\n    colors: {\n      light: [\"#fecaca\", \"#ef4444\", \"#7f1d1d\"],\n      dark: [\"#7f1d1d\", \"#ef4444\", \"#fecaca\"],\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      thresholds={[3, 10]} // [!code highlight]\n    >\n      <EChartsHeatmapChart.Cell dataKey=\"errors\" />\n      <EChartsHeatmapChart.MonthLabel />\n      <EChartsHeatmapChart.DayLabel />\n      <EChartsHeatmapChart.Tooltip />\n      <EChartsHeatmapChart.Legend lessLabel=\"Quiet\" moreLabel=\"Incident\" />\n    </EChartsHeatmapChart>\n  );\n}\n",
      "type": "registry:block"
    }
  ],
  "type": "registry:block"
}