Home / Function/ ChartContainer() — ui Function Reference

ChartContainer() — ui Function Reference

Architecture documentation for the ChartContainer() function in chart.tsx from the ui codebase.

Entity Profile

Dependency Diagram

graph TD
  84c0bd9d_31e3_aba6_9657_c7ae4ff109ac["ChartContainer()"]
  5b4f7e92_a51f_42d2_1777_632c60498bcd["chart.tsx"]
  84c0bd9d_31e3_aba6_9657_c7ae4ff109ac -->|defined in| 5b4f7e92_a51f_42d2_1777_632c60498bcd
  style 84c0bd9d_31e3_aba6_9657_c7ae4ff109ac fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

deprecated/www/registry/new-york/ui/chart.tsx lines 45–67

>(({ id, className, children, config, ...props }, ref) => {
  const uniqueId = React.useId()
  const chartId = `chart-${id || uniqueId.replace(/:/g, "")}`

  return (
    <ChartContext.Provider value={{ config }}>
      <div
        data-chart={chartId}
        ref={ref}
        className={cn(
          "flex aspect-video justify-center text-xs [&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-none [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-sector]:outline-none [&_.recharts-surface]:outline-none",
          className
        )}
        {...props}
      >
        <ChartStyle id={chartId} config={config} />
        <RechartsPrimitive.ResponsiveContainer>
          {children}
        </RechartsPrimitive.ResponsiveContainer>
      </div>
    </ChartContext.Provider>
  )
})

Subdomains

Frequently Asked Questions

What does ChartContainer() do?
ChartContainer() is a function in the ui codebase, defined in deprecated/www/registry/new-york/ui/chart.tsx.
Where is ChartContainer() defined?
ChartContainer() is defined in deprecated/www/registry/new-york/ui/chart.tsx at line 45.

Analyze Your Own Codebase

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

Try Supermodel Free