metric.tsx — ui Source File
Architecture documentation for metric.tsx, a tsx file in the ui codebase. 3 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR 7588835f_2002_a7d5_ca65_7cb2856acc23["metric.tsx"] da384753_eb23_55ed_e7a6_3bd0e172b999["recharts"] 7588835f_2002_a7d5_ca65_7cb2856acc23 --> da384753_eb23_55ed_e7a6_3bd0e172b999 95a7752f_4b97_5bde_5d7d_fca03536ac35["card"] 7588835f_2002_a7d5_ca65_7cb2856acc23 --> 95a7752f_4b97_5bde_5d7d_fca03536ac35 54edb93d_8b2b_eda5_dfc1_461038aaa132["chart"] 7588835f_2002_a7d5_ca65_7cb2856acc23 --> 54edb93d_8b2b_eda5_dfc1_461038aaa132 style 7588835f_2002_a7d5_ca65_7cb2856acc23 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
"use client"
import { Line, LineChart } from "recharts"
import {
Card,
CardContent,
CardDescription,
CardHeader,
CardTitle,
} from "@/registry/new-york/ui/card"
import {
ChartConfig,
ChartContainer,
ChartTooltip,
ChartTooltipContent,
} from "@/registry/new-york/ui/chart"
const data = [
{
average: 400,
today: 240,
},
{
average: 300,
today: 139,
},
{
average: 200,
today: 980,
},
{
average: 278,
today: 390,
},
{
average: 189,
today: 480,
},
{
average: 239,
today: 380,
},
{
average: 349,
today: 430,
},
]
const chartConfig = {
today: {
label: "Today",
color: "hsl(var(--primary))",
},
average: {
label: "Average",
color: "hsl(var(--primary))",
},
} satisfies ChartConfig
export function CardsMetric() {
return (
<Card>
<CardHeader>
<CardTitle>Exercise Minutes</CardTitle>
<CardDescription>
Your exercise minutes are ahead of where you normally are.
</CardDescription>
</CardHeader>
<CardContent className="pb-4">
<ChartContainer config={chartConfig} className="w-full md:h-[200px]">
<LineChart
data={data}
margin={{
top: 5,
right: 10,
left: 10,
bottom: 0,
}}
>
<Line
type="monotone"
strokeWidth={2}
dataKey="average"
stroke="var(--color-average)"
strokeOpacity={0.5}
activeDot={{
r: 6,
fill: "var(--color-average)",
}}
/>
<Line
type="monotone"
dataKey="today"
strokeWidth={2}
stroke="var(--color-today)"
activeDot={{
r: 8,
style: { fill: "var(--color-today)" },
}}
/>
<ChartTooltip content={<ChartTooltipContent />} />
</LineChart>
</ChartContainer>
</CardContent>
</Card>
)
}
Domain
Subdomains
Functions
Dependencies
- card
- chart
- recharts
Source
Frequently Asked Questions
What does metric.tsx do?
metric.tsx is a source file in the ui codebase, written in tsx. It belongs to the ComponentRegistry domain, UIPrimitives subdomain.
What functions are defined in metric.tsx?
metric.tsx defines 1 function(s): CardsMetric.
What does metric.tsx depend on?
metric.tsx imports 3 module(s): card, chart, recharts.
Where is metric.tsx in the architecture?
metric.tsx is located at deprecated/www/components/cards/metric.tsx (domain: ComponentRegistry, subdomain: UIPrimitives, directory: deprecated/www/components/cards).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free