Home / Function/ ChartAreaExample() — ui Function Reference

ChartAreaExample() — ui Function Reference

Architecture documentation for the ChartAreaExample() function in chart-example.tsx from the ui codebase.

Entity Profile

Dependency Diagram

graph TD
  e3a94f8e_e1f3_dcdb_e0d8_395ee9c0c0d4["ChartAreaExample()"]
  8468fea9_9e33_fada_d1d2_6f2ff6de5fa4["chart-example.tsx"]
  e3a94f8e_e1f3_dcdb_e0d8_395ee9c0c0d4 -->|defined in| 8468fea9_9e33_fada_d1d2_6f2ff6de5fa4
  style e3a94f8e_e1f3_dcdb_e0d8_395ee9c0c0d4 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

apps/v4/registry/bases/radix/examples/chart-example.tsx lines 73–138

function ChartAreaExample() {
  return (
    <Example title="Area Chart">
      <Card className="w-full">
        <CardHeader>
          <CardTitle>Area Chart</CardTitle>
          <CardDescription>
            Showing total visitors for the last 6 months
          </CardDescription>
        </CardHeader>
        <CardContent>
          <ChartContainer config={areaChartConfig}>
            <AreaChart
              accessibilityLayer
              data={areaChartData}
              margin={{
                left: 12,
                right: 12,
              }}
            >
              <CartesianGrid vertical={false} />
              <XAxis
                dataKey="month"
                tickLine={false}
                axisLine={false}
                tickMargin={8}
                tickFormatter={(value) => value.slice(0, 3)}
              />
              <ChartTooltip
                cursor={false}
                content={<ChartTooltipContent indicator="line" />}
              />
              <Area
                dataKey="desktop"
                type="natural"
                fill="var(--color-desktop)"
                fillOpacity={0.4}
                stroke="var(--color-desktop)"
              />
            </AreaChart>
          </ChartContainer>
        </CardContent>
        <CardFooter>
          <div className="flex w-full items-start gap-2">
            <div className="grid 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 flex items-center gap-2 leading-none">
                January - June 2024
              </div>
            </div>
          </div>
        </CardFooter>
      </Card>
    </Example>
  )
}

Subdomains

Frequently Asked Questions

What does ChartAreaExample() do?
ChartAreaExample() is a function in the ui codebase, defined in apps/v4/registry/bases/radix/examples/chart-example.tsx.
Where is ChartAreaExample() defined?
ChartAreaExample() is defined in apps/v4/registry/bases/radix/examples/chart-example.tsx at line 73.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free