Home / Function/ Charts() — ui Function Reference

Charts() — ui Function Reference

Architecture documentation for the Charts() function in charts-01.tsx from the ui codebase.

Entity Profile

Dependency Diagram

graph TD
  e31b99cd_c1c1_7c77_ea47_d6242c8b99d4["Charts()"]
  ea86cbd6_c679_6799_3dc7_d6871211d651["charts-01.tsx"]
  e31b99cd_c1c1_7c77_ea47_d6242c8b99d4 -->|defined in| ea86cbd6_c679_6799_3dc7_d6871211d651
  style e31b99cd_c1c1_7c77_ea47_d6242c8b99d4 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

deprecated/www/registry/new-york/internal/charts-01.tsx lines 43–895

export default function Charts() {
  return (
    <div className="chart-wrapper mx-auto flex max-w-6xl flex-col flex-wrap items-start justify-center gap-6 p-6 sm:flex-row sm:p-8">
      <div className="grid w-full gap-6 sm:grid-cols-2 lg:max-w-[22rem] lg:grid-cols-1 xl:max-w-[25rem]">
        <Card
          x-chunk="A bar chart showing the number of steps you have walked in the past 7 days."
          className="lg:max-w-md"
        >
          <CardHeader className="space-y-0 pb-2">
            <CardDescription>Today</CardDescription>
            <CardTitle className="text-4xl tabular-nums">
              12,584{" "}
              <span className="font-sans text-sm font-normal tracking-normal text-muted-foreground">
                steps
              </span>
            </CardTitle>
          </CardHeader>
          <CardContent>
            <ChartContainer
              config={{
                steps: {
                  label: "Steps",
                  color: "hsl(var(--chart-1))",
                },
              }}
            >
              <BarChart
                accessibilityLayer
                margin={{
                  left: -4,
                  right: -4,
                }}
                data={[
                  {
                    date: "2024-01-01",
                    steps: 2000,
                  },
                  {
                    date: "2024-01-02",
                    steps: 2100,
                  },
                  {
                    date: "2024-01-03",
                    steps: 2200,
                  },
                  {
                    date: "2024-01-04",
                    steps: 1300,
                  },
                  {
                    date: "2024-01-05",
                    steps: 1400,
                  },
                  {
                    date: "2024-01-06",
                    steps: 2500,
                  },
                  {
                    date: "2024-01-07",
                    steps: 1600,
                  },
                ]}
              >
                <Bar
                  dataKey="steps"
                  fill="var(--color-steps)"
                  radius={5}
                  fillOpacity={0.6}
                  activeBar={<Rectangle fillOpacity={0.8} />}
                />
                <XAxis
                  dataKey="date"
                  tickLine={false}
                  axisLine={false}
                  tickMargin={4}
                  tickFormatter={(value) => {
                    return new Date(value).toLocaleDateString("en-US", {
                      weekday: "short",
                    })
                  }}
                />

Subdomains

Frequently Asked Questions

What does Charts() do?
Charts() is a function in the ui codebase, defined in deprecated/www/registry/new-york/internal/charts-01.tsx.
Where is Charts() defined?
Charts() is defined in deprecated/www/registry/new-york/internal/charts-01.tsx at line 43.

Analyze Your Own Codebase

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

Try Supermodel Free