chart-area-axes
yyc3-knowledge-base/chart-area-axesUnverifiedBlock
shadcn/ui publishes no description for this item.
Install it
npx shadcn@latest add https://raw.githubusercontent.com/YYC-Cube/YYC3-Knowledge-Base/main/YYC3-D/ui/apps/v4/chart-area-axes.jsonSource
1"use client"23import { TrendingUp } from "lucide-react"4import { Area, AreaChart, CartesianGrid, XAxis, YAxis } from "recharts"56import {7 Card,8 CardContent,9 CardDescription,10 CardFooter,11 CardHeader,12 CardTitle,13} from "@/registry/new-york/ui/card"14import {15 ChartConfig,16 ChartContainer,17 ChartTooltip,18 ChartTooltipContent,19} from "@/registry/new-york/ui/chart"20const chartData = [21 { month: "January", desktop: 186, mobile: 80 },22 { month: "February", desktop: 305, mobile: 200 },23 { month: "March", desktop: 237, mobile: 120 },24 { month: "April", desktop: 73, mobile: 190 },25 { month: "May", desktop: 209, mobile: 130 },26 { month: "June", desktop: 214, mobile: 140 },27]2829const chartConfig = {30 desktop: {31 label: "Desktop",32 color: "hsl(var(--chart-1))",33 },34 mobile: {35 label: "Mobile",36 color: "hsl(var(--chart-2))",37 },38} satisfies ChartConfig3940export default function Component() {41 return (42 <Card>43 <CardHeader>44 <CardTitle>Area Chart - Axes</CardTitle>45 <CardDescription>46 Showing total visitors for the last 6 months47 </CardDescription>48 </CardHeader>49 <CardContent>50 <ChartContainer config={chartConfig}>51 <AreaChart52 accessibilityLayer53 data={chartData}54 margin={{55 left: -20,56 right: 12,57 }}58 >59 <CartesianGrid vertical={false} />60 <XAxis61 dataKey="month"62 tickLine={false}63 axisLine={false}64 tickMargin={8}65 tickFormatter={(value) => value.slice(0, 3)}66 />67 <YAxis68 tickLine={false}69 axisLine={false}70 tickMargin={8}71 tickCount={3}72 />73 <ChartTooltip cursor={false} content={<ChartTooltipContent />} />74 <Area75 dataKey="mobile"76 type="natural"77 fill="var(--color-mobile)"78 fillOpacity={0.4}79 stroke="var(--color-mobile)"80 stackId="a"81 />82 <Area83 dataKey="desktop"84 type="natural"85 fill="var(--color-desktop)"86 fillOpacity={0.4}87 stroke="var(--color-desktop)"88 stackId="a"89 />90 </AreaChart>91 </ChartContainer>92 </CardContent>93 <CardFooter>94// … truncated
What it pulls in
Other registry items
Files it writes
More from shadcn/ui
All 411 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| chart-area-defaultchart-area-default | shadcn/ui | Blocks | Unverified | no deps | |
| chart-area-gradientchart-area-gradient | shadcn/ui | Blocks | Unverified | no deps | |
| chart-area-iconschart-area-icons | shadcn/ui | Blocks | Unverified | no deps | |
| chart-area-interactivechart-area-interactive | shadcn/ui | Blocks | Unverified | no deps | |
| chart-area-legendchart-area-legend | shadcn/ui | Blocks | Unverified | no deps | |
| chart-area-linearchart-area-linear | shadcn/ui | Blocks | Unverified | no deps | |
| chart-area-stackedchart-area-stacked | shadcn/ui | Blocks | Unverified | no deps | |
| chart-area-stacked-expandchart-area-stacked-expand | shadcn/ui | Blocks | Unverified | no deps |
