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
  ad5df751_04df_a5e2_64ac_8fdc013330a0["ChartAreaExample()"]
  db4385e3_ad03_edc8_f86f_bcba741693f3["chart-example.tsx"]
  ad5df751_04df_a5e2_64ac_8fdc013330a0 -->|defined in| db4385e3_ad03_edc8_f86f_bcba741693f3
  style ad5df751_04df_a5e2_64ac_8fdc013330a0 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

apps/v4/registry/bases/base/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/base/examples/chart-example.tsx.
Where is ChartAreaExample() defined?
ChartAreaExample() is defined in apps/v4/registry/bases/base/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