Home / Function/ ChartDisplay() — ui Function Reference

ChartDisplay() — ui Function Reference

Architecture documentation for the ChartDisplay() function in chart-display.tsx from the ui codebase.

Entity Profile

Dependency Diagram

graph TD
  24e05880_dd40_5bca_8463_1dc390588ddb["ChartDisplay()"]
  3ecd5bbf_5fab_7d59_90a0_a989605868f3["chart-display.tsx"]
  24e05880_dd40_5bca_8463_1dc390588ddb -->|defined in| 3ecd5bbf_5fab_7d59_90a0_a989605868f3
  95e4a002_68a8_593a_4cba_78f4a5fd971c["getCachedRegistryItem()"]
  24e05880_dd40_5bca_8463_1dc390588ddb -->|calls| 95e4a002_68a8_593a_4cba_78f4a5fd971c
  fd0e96e0_6f65_b748_1806_39bd441fd8ec["getChartHighlightedCode()"]
  24e05880_dd40_5bca_8463_1dc390588ddb -->|calls| fd0e96e0_6f65_b748_1806_39bd441fd8ec
  style 24e05880_dd40_5bca_8463_1dc390588ddb fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

deprecated/www/components/chart-display.tsx lines 14–46

export async function ChartDisplay({
  name,
  children,
  className,
}: { name: string } & React.ComponentProps<"div">) {
  const chart = await getCachedRegistryItem(name)
  const highlightedCode = await getChartHighlightedCode(
    chart?.files?.[0]?.content ?? ""
  )

  if (!chart || !highlightedCode) {
    return null
  }

  return (
    <div
      className={cn(
        "themes-wrapper group relative flex flex-col overflow-hidden rounded-xl border shadow transition-all duration-200 ease-in-out hover:z-30",
        className
      )}
    >
      <ChartToolbar
        chart={{ ...chart, highlightedCode }}
        className="relative z-20 flex justify-end border-b bg-card px-3 py-2.5 text-card-foreground"
      >
        {children}
      </ChartToolbar>
      <div className="relative z-10 [&>div]:rounded-none [&>div]:border-none [&>div]:shadow-none">
        {children}
      </div>
    </div>
  )
}

Subdomains

Frequently Asked Questions

What does ChartDisplay() do?
ChartDisplay() is a function in the ui codebase, defined in deprecated/www/components/chart-display.tsx.
Where is ChartDisplay() defined?
ChartDisplay() is defined in deprecated/www/components/chart-display.tsx at line 14.
What does ChartDisplay() call?
ChartDisplay() calls 2 function(s): getCachedRegistryItem, getChartHighlightedCode.

Analyze Your Own Codebase

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

Try Supermodel Free