{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "bar-chart-kpi-02",
  "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/bar-chart-kpi-02.tsx",
      "content": "'use client'\n\nimport { TinyBarChart, ValueFormatter } from '@/registry/components/dashboardblocks/chart'\nimport { KPI, KPIContent, KPIValue } from '@/registry/components/dashboardblocks/kpi'\nimport { Trend } from '@/registry/components/dashboardblocks/trend'\nimport type { Props as BarProps } from 'recharts/types/cartesian/Bar'\n\nimport { CardDescription } from '@/components/ui/card'\n\ninterface BarChartKPI2Props {\n  bars: BarProps[]\n  trend: number\n  data: unknown[]\n  formatter?: ValueFormatter\n  height: number\n  title: string\n  value: number\n}\n\nconst exampleProps: BarChartKPI2Props = {\n  bars: [\n    {\n      dataKey: 'value',\n      fill: 'var(--color-chart-1)',\n    },\n    {\n      dataKey: 'goal',\n      fill: 'var(--color-chart-2)',\n    },\n  ],\n  trend: 7.5,\n  data: [\n    {\n      label: 'Monday',\n      value: 3200,\n      goal: 3800,\n    },\n    {\n      label: 'Tuesday',\n      value: 4500,\n      goal: 4200,\n    },\n    {\n      label: 'Wednesday',\n      value: 2800,\n      goal: 3400,\n    },\n    {\n      label: 'Thursday',\n      value: 5200,\n      goal: 4800,\n    },\n    {\n      label: 'Friday',\n      value: 6100,\n      goal: 6400,\n    },\n    {\n      label: 'Saturday',\n      value: 4800,\n      goal: 5200,\n    },\n    {\n      label: 'Sunday',\n      value: 5700,\n      goal: 6000,\n    },\n  ],\n  formatter: (value) => `$${value.toLocaleString()}`,\n  height: 160,\n  title: 'Revenue',\n  value: 87500,\n}\n\nconst BarChartKPI2 = (props: BarChartKPI2Props) => {\n  const { bars, trend, data, formatter, height, 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        <TinyBarChart data={data} bars={bars} formatter={formatter} height={height} />\n      </KPIContent>\n    </KPI>\n  )\n}\n\nexport { BarChartKPI2, exampleProps as barChartKPI2ExampleProps, type BarChartKPI2Props }\n",
      "type": "registry:component"
    }
  ],
  "type": "registry:component"
}
