{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "shipments-echarts-line-chart",
  "description": "Week-over-week comparison with a solid and a dashed grayscale line",
  "dependencies": [
    "echarts",
    "motion"
  ],
  "registryDependencies": [
    "@evilcharts/echarts-line-chart"
  ],
  "files": [
    {
      "path": "src/registry/blocks/echarts/b-shipments-echarts-line-chart.tsx",
      "content": "\"use client\";\n\nimport { EChartsLineChart, type ChartConfig } from \"@/registry/charts/echarts-line-chart\";\nimport { cn } from \"@/lib/utils\";\n\nconst chartData = [\n  { slot: \"Mon 1\", current: 14, previous: 34 },\n  { slot: \"Mon 2\", current: 9, previous: 41 },\n  { slot: \"Mon 3\", current: 18, previous: 37 },\n  { slot: \"Mon 4\", current: 26, previous: 29 },\n  { slot: \"Tue 1\", current: 31, previous: 24 },\n  { slot: \"Tue 2\", current: 27, previous: 33 },\n  { slot: \"Tue 3\", current: 19, previous: 45 },\n  { slot: \"Tue 4\", current: 12, previous: 52 },\n  { slot: \"Wed 1\", current: 16, previous: 47 },\n  { slot: \"Wed 2\", current: 22, previous: 39 },\n  { slot: \"Wed 3\", current: 15, previous: 44 },\n  { slot: \"Wed 4\", current: 11, previous: 50 },\n  { slot: \"Thu 1\", current: 17, previous: 43 },\n  { slot: \"Thu 2\", current: 24, previous: 31 },\n  { slot: \"Thu 3\", current: 20, previous: 26 },\n  { slot: \"Thu 4\", current: 13, previous: 22 },\n  { slot: \"Fri 1\", current: 21, previous: 28 },\n  { slot: \"Fri 2\", current: 29, previous: 36 },\n  { slot: \"Fri 3\", current: 34, previous: 42 },\n  { slot: \"Fri 4\", current: 28, previous: 55 },\n  { slot: \"Sat 1\", current: 23, previous: 49 },\n  { slot: \"Sat 2\", current: 30, previous: 40 },\n  { slot: \"Sat 3\", current: 36, previous: 35 },\n  { slot: \"Sat 4\", current: 32, previous: 44 },\n];\n\nconst chartConfig = {\n  current: { label: \"This week\", colors: { light: [\"#171717\"], dark: [\"#fafafa\"] } },\n  previous: { label: \"Last week\", colors: { light: [\"#d4d4d4\"], dark: [\"#525252\"] } },\n} satisfies ChartConfig;\n\nconst LEGEND = [\n  { key: \"current\", label: \"This week\", swatch: \"border-[#171717] dark:border-[#fafafa]\" },\n  { key: \"previous\", label: \"Last week\", swatch: \"border-[#d4d4d4] dark:border-[#525252]\" },\n];\n\nconst TOTAL = chartData.reduce((sum, { current }) => sum + current, 0);\n\nexport function EChartsShipmentsLineChart() {\n  return (\n    <div className=\"flex h-full w-full flex-col p-4\">\n      <span className=\"text-primary text-sm font-medium tracking-tight\">Orders shipped</span>\n\n      <div className=\"mt-1 flex flex-wrap items-center justify-between gap-x-4 gap-y-1\">\n        <div className=\"flex items-baseline gap-2\">\n          <span className=\"text-primary text-2xl font-semibold tracking-tight sm:text-3xl\">\n            {TOTAL}\n          </span>\n          <span className=\"text-xs font-medium text-emerald-500\">+4.2%</span>\n          <span className=\"text-muted-foreground text-xs\">vs last week</span>\n        </div>\n        <div className=\"flex items-center gap-3\">\n          {LEGEND.map(({ key, label, swatch }) => (\n            <span\n              key={key}\n              className=\"text-muted-foreground flex items-center gap-1.5 text-[11px] sm:text-xs\"\n            >\n              <span className={cn(\"size-2.5 shrink-0 rounded-full border-2\", swatch)} />\n              {label}\n            </span>\n          ))}\n        </div>\n      </div>\n\n      <div className=\"mt-2 min-h-0 w-full flex-1\">\n        <EChartsLineChart\n          data={chartData}\n          config={chartConfig}\n          xDataKey=\"slot\"\n          className=\"h-full w-full\"\n          curveType=\"linear\"\n        >\n          <EChartsLineChart.Grid />\n          <EChartsLineChart.YAxis />\n          <EChartsLineChart.XAxis\n            dataKey=\"slot\"\n            tickFormatter={(value) => (value.endsWith(\" 1\") ? value.slice(0, 3) : \"\")}\n          />\n          <EChartsLineChart.Tooltip />\n          <EChartsLineChart.Line dataKey=\"previous\" strokeVariant=\"dashed\" strokeWidth={1.5} />\n          <EChartsLineChart.Line dataKey=\"current\" strokeVariant=\"solid\" strokeWidth={1.5}>\n            <EChartsLineChart.ActiveDot />\n          </EChartsLineChart.Line>\n        </EChartsLineChart>\n      </div>\n    </div>\n  );\n}\n",
      "type": "registry:block",
      "target": "components/evilcharts/blocks/shipments-echarts-line-chart.tsx"
    }
  ],
  "type": "registry:block"
}