ChartRadialExample() — ui Function Reference
Architecture documentation for the ChartRadialExample() function in chart-example.tsx from the ui codebase.
Entity Profile
Dependency Diagram
graph TD af16ca8a_de9a_b720_cda0_ad94c3642c45["ChartRadialExample()"] db4385e3_ad03_edc8_f86f_bcba741693f3["chart-example.tsx"] af16ca8a_de9a_b720_cda0_ad94c3642c45 -->|defined in| db4385e3_ad03_edc8_f86f_bcba741693f3 style af16ca8a_de9a_b720_cda0_ad94c3642c45 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
apps/v4/registry/bases/base/examples/chart-example.tsx lines 501–581
function ChartRadialExample() {
return (
<Example title="Radial Chart">
<Card className="w-full">
<CardHeader>
<CardTitle>Radial Chart - Shape</CardTitle>
<CardDescription>January - June 2024</CardDescription>
</CardHeader>
<CardContent className="flex-1 pb-0">
<ChartContainer
config={radialChartConfig}
className="mx-auto aspect-square max-h-[210px]"
>
<RadialBarChart
data={radialChartData}
endAngle={100}
innerRadius={80}
outerRadius={140}
>
<PolarGrid
gridType="circle"
radialLines={false}
stroke="none"
className="first:fill-muted last:fill-background"
polarRadius={[86, 74]}
/>
<RadialBar dataKey="visitors" background />
<PolarRadiusAxis tick={false} tickLine={false} axisLine={false}>
<Label
content={({ viewBox }) => {
if (viewBox && "cx" in viewBox && "cy" in viewBox) {
return (
<text
x={viewBox.cx}
y={viewBox.cy}
textAnchor="middle"
dominantBaseline="middle"
>
<tspan
x={viewBox.cx}
y={viewBox.cy}
className="fill-foreground text-4xl font-bold"
>
{radialChartData[0].visitors.toLocaleString()}
</tspan>
<tspan
x={viewBox.cx}
y={(viewBox.cy || 0) + 24}
className="fill-muted-foreground"
>
Visitors
</tspan>
</text>
)
}
}}
/>
</PolarRadiusAxis>
</RadialBarChart>
</ChartContainer>
</CardContent>
<CardFooter className="flex-col gap-2">
<div className="flex items-center gap-2 leading-none font-medium">
Trending up by 5.2% this month{" "}
<IconPlaceholder
lucide="TrendingUpIcon"
tabler="IconTrendingUp"
hugeicons="ChartUpIcon"
phosphor="TrendUpIcon"
remixicon="RiLineChartLine"
className="size-4"
/>
</div>
<div className="text-muted-foreground leading-none">
Showing total visitors for the last 6 months
</div>
</CardFooter>
</Card>
</Example>
)
}
Domain
Subdomains
Source
Frequently Asked Questions
What does ChartRadialExample() do?
ChartRadialExample() is a function in the ui codebase, defined in apps/v4/registry/bases/base/examples/chart-example.tsx.
Where is ChartRadialExample() defined?
ChartRadialExample() is defined in apps/v4/registry/bases/base/examples/chart-example.tsx at line 501.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free