ChartTooltipFormatter() — ui Function Reference
Architecture documentation for the ChartTooltipFormatter() function in chart-tooltip-formatter.tsx from the ui codebase.
Entity Profile
Dependency Diagram
graph TD 65fcc72e_22c0_7e15_3bd2_66ce108917d6["ChartTooltipFormatter()"] bcda31e9_23ec_a7bc_e105_6136c731e5b5["chart-tooltip-formatter.tsx"] 65fcc72e_22c0_7e15_3bd2_66ce108917d6 -->|defined in| bcda31e9_23ec_a7bc_e105_6136c731e5b5 style 65fcc72e_22c0_7e15_3bd2_66ce108917d6 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
apps/v4/registry/new-york-v4/charts/chart-tooltip-formatter.tsx lines 41–100
export function ChartTooltipFormatter() {
return (
<Card>
<CardHeader>
<CardTitle>Tooltip - Formatter</CardTitle>
<CardDescription>Tooltip with custom formatter .</CardDescription>
</CardHeader>
<CardContent>
<ChartContainer config={chartConfig}>
<BarChart accessibilityLayer data={chartData}>
<XAxis
dataKey="date"
tickLine={false}
tickMargin={10}
axisLine={false}
tickFormatter={(value) => {
return new Date(value).toLocaleDateString("en-US", {
weekday: "short",
})
}}
/>
<Bar
dataKey="running"
stackId="a"
fill="var(--color-running)"
radius={[0, 0, 4, 4]}
/>
<Bar
dataKey="swimming"
stackId="a"
fill="var(--color-swimming)"
radius={[4, 4, 0, 0]}
/>
<ChartTooltip
content={
<ChartTooltipContent
hideLabel
formatter={(value, name) => (
<div className="text-muted-foreground flex min-w-[130px] items-center text-xs">
{chartConfig[name as keyof typeof chartConfig]?.label ||
name}
<div className="text-foreground ml-auto flex items-baseline gap-0.5 font-mono font-medium tabular-nums">
{value}
<span className="text-muted-foreground font-normal">
kcal
</span>
</div>
</div>
)}
/>
}
cursor={false}
defaultIndex={1}
/>
</BarChart>
</ChartContainer>
</CardContent>
</Card>
)
}
Domain
Subdomains
Source
Frequently Asked Questions
What does ChartTooltipFormatter() do?
ChartTooltipFormatter() is a function in the ui codebase, defined in apps/v4/registry/new-york-v4/charts/chart-tooltip-formatter.tsx.
Where is ChartTooltipFormatter() defined?
ChartTooltipFormatter() is defined in apps/v4/registry/new-york-v4/charts/chart-tooltip-formatter.tsx at line 41.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free