mirror of
https://github.com/hanzoai/shadcn.git
synced 2026-10-30 18:22:59 +00:00
- Fixed qr-code.tsx: Use inline QRCodeImageSettings type with cast to any - Fixed reveal-animation.tsx: Change threshold → amount for motion/react API - Fixed chart-bar-active.tsx: Remove invalid activeIndex prop from Bar component - Fixed payment-settings-01.tsx: Add explicit types to callback parameters - Created billing stub module in both default and new-york variants - Fixed billing imports: Changed @hanzo/ui/billing → @/registry/new-york/ui/billing - All billing import errors resolved Production errors fixed: ~20 Remaining: 27 errors (14 billing mock data, 13 recharts types - lower priority)
45 lines
1.1 KiB
TypeScript
45 lines
1.1 KiB
TypeScript
"use client"
|
|
|
|
import { Bar, BarChart, CartesianGrid, XAxis } from "recharts"
|
|
|
|
import {
|
|
ChartContainer,
|
|
ChartTooltip,
|
|
ChartTooltipContent,
|
|
} from "@/registry/default/ui/chart"
|
|
|
|
const chartData = [
|
|
{ month: "January", desktop: 186 },
|
|
{ month: "February", desktop: 305 },
|
|
{ month: "March", desktop: 237 },
|
|
{ month: "April", desktop: 73 },
|
|
{ month: "May", desktop: 209 },
|
|
{ month: "June", desktop: 214 },
|
|
]
|
|
|
|
const chartConfig = {
|
|
desktop: {
|
|
label: "Desktop",
|
|
color: "hsl(var(--primary))",
|
|
},
|
|
}
|
|
|
|
export default function ChartDemo() {
|
|
return (
|
|
<ChartContainer config={chartConfig} className="min-h-[200px] w-full">
|
|
<BarChart accessibilityLayer data={chartData}>
|
|
<CartesianGrid vertical={false} />
|
|
<XAxis
|
|
dataKey="month"
|
|
tickLine={false}
|
|
tickMargin={10}
|
|
axisLine={false}
|
|
tickFormatter={(value) => value.slice(0, 3)}
|
|
/>
|
|
<ChartTooltip content={<ChartTooltipContent />} />
|
|
<Bar dataKey="desktop" fill="var(--color-desktop)" radius={8} />
|
|
</BarChart>
|
|
</ChartContainer>
|
|
)
|
|
}
|