diff --git a/components/examples/component-showcase.tsx b/components/examples/component-showcase.tsx
index 58714b84..4a17e86b 100644
--- a/components/examples/component-showcase.tsx
+++ b/components/examples/component-showcase.tsx
@@ -2,7 +2,6 @@ import Image from "next/image";
import { Activity, Upload, Users } from "lucide-react";
-import { ChartExample } from "@/components/ui/8bit/blocks/chart";
import { LoginForm } from "@/components/ui/8bit/blocks/login-form";
import {
Card,
@@ -25,6 +24,8 @@ import { Textarea } from "@/components/ui/8bit/textarea";
import { CalendarExample } from "@/components/examples/calendar";
import { CommandExample } from "@/components/examples/command";
+import ChartBarMultiple from "../ui/8bit/blocks/chart-bar";
+
export default function ComponentShowcase() {
return (
@@ -96,7 +97,7 @@ export default function ComponentShowcase() {
-
+
diff --git a/components/ui/8bit/blocks/chart-bar.tsx b/components/ui/8bit/blocks/chart-bar.tsx
new file mode 100644
index 00000000..4139245d
--- /dev/null
+++ b/components/ui/8bit/blocks/chart-bar.tsx
@@ -0,0 +1,55 @@
+"use client";
+
+import { Bar, BarChart, CartesianGrid, XAxis } from "recharts";
+
+import {
+ ChartConfig,
+ ChartContainer,
+ ChartTooltip,
+ ChartTooltipContent,
+} from "@/components/ui/8bit/chart";
+
+export const description = "A multiple bar chart";
+
+const chartData = [
+ { month: "January", desktop: 186, mobile: 80 },
+ { month: "February", desktop: 305, mobile: 200 },
+ { month: "March", desktop: 237, mobile: 120 },
+ { month: "April", desktop: 73, mobile: 190 },
+ { month: "May", desktop: 209, mobile: 130 },
+ { month: "June", desktop: 214, mobile: 140 },
+];
+
+const chartConfig = {
+ desktop: {
+ label: "Desktop",
+ color: "var(--chart-1)",
+ },
+ mobile: {
+ label: "Mobile",
+ color: "var(--chart-2)",
+ },
+} satisfies ChartConfig;
+
+export default function ChartBarMultiple() {
+ return (
+
+
+
+ value.slice(0, 3)}
+ />
+ }
+ />
+
+
+
+
+ );
+}
diff --git a/components/ui/8bit/blocks/chart.tsx b/components/ui/8bit/blocks/chart.tsx
index 25975d14..c349ae97 100644
--- a/components/ui/8bit/blocks/chart.tsx
+++ b/components/ui/8bit/blocks/chart.tsx
@@ -48,7 +48,7 @@ export function ChartExample() {
/>
} />
@@ -207,7 +207,7 @@ function ChartTooltipContent({
!hideIndicator && (
) : (
\n
\n \n value.slice(0, 3)}\n />\n }\n />\n \n \n \n \n );\n}\n",
+ "type": "registry:component",
+ "target": "components/ui/8bit/blocks/chart-bar.tsx"
+ },
+ {
+ "path": "components/ui/8bit/chart.tsx",
+ "content": "\"use client\";\n\nimport * as React from \"react\";\n\nimport * as RechartsPrimitive from \"recharts\";\n\nimport { cn } from \"@/lib/utils\";\n\n// Format: { THEME_NAME: CSS_SELECTOR }\nconst THEMES = { light: \"\", dark: \".dark\" } as const;\n\nexport type ChartConfig = {\n [k in string]: {\n label?: React.ReactNode;\n icon?: React.ComponentType;\n } & (\n | { color?: string; theme?: never }\n | { color?: never; theme: Record
}\n );\n};\n\ntype ChartContextProps = {\n config: ChartConfig;\n};\n\nconst ChartContext = React.createContext(null);\n\nfunction useChart() {\n const context = React.useContext(ChartContext);\n\n if (!context) {\n throw new Error(\"useChart must be used within a \");\n }\n\n return context;\n}\n\nfunction ChartContainer({\n id,\n className,\n children,\n config,\n ...props\n}: React.ComponentProps<\"div\"> & {\n config: ChartConfig;\n children: React.ComponentProps<\n typeof RechartsPrimitive.ResponsiveContainer\n >[\"children\"];\n}) {\n const uniqueId = React.useId();\n const chartId = `chart-${id || uniqueId.replace(/:/g, \"\")}`;\n\n return (\n \n \n \n \n {children}\n \n
\n \n );\n}\n\nconst ChartStyle = ({ id, config }: { id: string; config: ChartConfig }) => {\n const colorConfig = Object.entries(config).filter(\n ([, config]) => config.theme || config.color\n );\n\n if (!colorConfig.length) {\n return null;\n }\n\n return (\n