Home / Function/ ChartLineExample() — ui Function Reference

ChartLineExample() — ui Function Reference

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

Entity Profile

Dependency Diagram

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

Relationship Graph

Source Code

apps/v4/registry/bases/base/examples/chart-example.tsx lines 229–296

function ChartLineExample() {
  return (
    <Example title="Line Chart">
      <Card className="w-full">
        <CardHeader>
          <CardTitle>Line Chart - Multiple</CardTitle>
          <CardDescription>January - June 2024</CardDescription>
        </CardHeader>
        <CardContent>
          <ChartContainer config={lineChartConfig}>
            <LineChart
              accessibilityLayer
              data={lineChartData}
              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 />} />
              <Line
                dataKey="desktop"
                type="monotone"
                stroke="var(--color-desktop)"
                strokeWidth={2}
                dot={false}
              />
              <Line
                dataKey="mobile"
                type="monotone"
                stroke="var(--color-mobile)"
                strokeWidth={2}
                dot={false}
              />
            </LineChart>
          </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">
                Showing total visitors for the last 6 months
              </div>
            </div>
          </div>
        </CardFooter>
      </Card>
    </Example>
  )
}

Subdomains

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free