{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "line-chart-kpi-01",
  "registryDependencies": [
    "https://dashboardblocks.com/r/animated-number.json",
    "https://dashboardblocks.com/r/chart.json",
    "https://dashboardblocks.com/r/kpi.json",
    "https://dashboardblocks.com/r/trend.json"
  ],
  "files": [
    {
      "path": "registry/components/dashboardblocks/kpi/line-chart-kpi-01.tsx",
      "content": "'use client'\n\nimport {\n  TinyLineChart,\n  ValueFormatter,\n} from '@/registry/components/dashboardblocks/chart'\nimport { KPI, KPIContent, KPIValue } from '@/registry/components/dashboardblocks/kpi'\nimport { Trend } from '@/registry/components/dashboardblocks/trend'\nimport { LineProps } from 'recharts'\n\nimport { CardDescription } from '@/components/ui/card'\n\ninterface LineChartKPI1Props {\n  trend: number\n  data: unknown[]\n  formatter?: ValueFormatter\n  height: number\n  lines: LineProps[]\n  title: string\n  value: number\n}\n\nconst exampleProps: LineChartKPI1Props = {\n  trend: 4.2,\n  data: [\n    {\n      label: 'Monday',\n      value: 4200,\n    },\n    {\n      label: 'Tuesday',\n      value: 5100,\n    },\n    {\n      label: 'Wednesday',\n      value: 2800,\n    },\n    {\n      label: 'Thursday',\n      value: 5600,\n    },\n    {\n      label: 'Friday',\n      value: 6300,\n    },\n    {\n      label: 'Saturday',\n      value: 5400,\n    },\n    {\n      label: 'Sunday',\n      value: 6900,\n    },\n  ],\n  formatter: (value) => {\n    const k = value / 1000\n    return `${k.toFixed(1)}k visits`\n  },\n  height: 120,\n  lines: [\n    {\n      dataKey: 'value',\n      stroke: 'var(--color-primary)',\n    },\n  ],\n  title: 'Daily visitors',\n  value: 48230,\n}\n\nconst LineChartKPI1 = (props: LineChartKPI1Props) => {\n  const { trend, data, formatter, height, lines, title, value } = props\n  return (\n    <KPI>\n      <KPIContent>\n        <div className='space-y-1'>\n          <div className='flex items-center justify-between'>\n            <CardDescription>{title}</CardDescription>\n            <Trend trend={trend} variant='badge' />\n          </div>\n          <KPIValue value={value} formatter={formatter} animated />\n        </div>\n        <TinyLineChart data={data} lines={lines} formatter={formatter} height={height} />\n      </KPIContent>\n    </KPI>\n  )\n}\n\nexport {\n  LineChartKPI1,\n  exampleProps as lineChartKpi1ExampleProps,\n  type LineChartKPI1Props,\n}\n",
      "type": "registry:component"
    }
  ],
  "type": "registry:component"
}
