chart-bar-demo-legend.tsx — ui Source File
Architecture documentation for chart-bar-demo-legend.tsx, a tsx file in the ui codebase. 2 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR 2c8d1277_27d3_749b_ef3a_ce889db10fce["chart-bar-demo-legend.tsx"] da384753_eb23_55ed_e7a6_3bd0e172b999["recharts"] 2c8d1277_27d3_749b_ef3a_ce889db10fce --> da384753_eb23_55ed_e7a6_3bd0e172b999 9c524c37_6bc6_459f_8f33_9c86aa346baf["chart"] 2c8d1277_27d3_749b_ef3a_ce889db10fce --> 9c524c37_6bc6_459f_8f33_9c86aa346baf style 2c8d1277_27d3_749b_ef3a_ce889db10fce fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
"use client"
import { Bar, BarChart, CartesianGrid, XAxis } from "recharts"
import {
ChartConfig,
ChartContainer,
ChartLegend,
ChartLegendContent,
ChartTooltip,
ChartTooltipContent,
} from "@/registry/default/ui/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: "#2563eb",
},
mobile: {
label: "Mobile",
color: "#60a5fa",
},
} satisfies ChartConfig
export default function Component() {
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 />} />
<ChartLegend content={<ChartLegendContent />} />
<Bar dataKey="desktop" fill="var(--color-desktop)" radius={4} />
<Bar dataKey="mobile" fill="var(--color-mobile)" radius={4} />
</BarChart>
</ChartContainer>
)
}
Domain
Subdomains
Functions
Dependencies
- chart
- recharts
Source
Frequently Asked Questions
What does chart-bar-demo-legend.tsx do?
chart-bar-demo-legend.tsx is a source file in the ui codebase, written in tsx. It belongs to the ComponentRegistry domain, ChartRegistry subdomain.
What functions are defined in chart-bar-demo-legend.tsx?
chart-bar-demo-legend.tsx defines 1 function(s): Component.
What does chart-bar-demo-legend.tsx depend on?
chart-bar-demo-legend.tsx imports 2 module(s): chart, recharts.
Where is chart-bar-demo-legend.tsx in the architecture?
chart-bar-demo-legend.tsx is located at deprecated/www/registry/default/examples/chart-bar-demo-legend.tsx (domain: ComponentRegistry, subdomain: ChartRegistry, directory: deprecated/www/registry/default/examples).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free