mirror of
https://github.com/hanzoai/shadcn.git
synced 2026-10-30 18:22:59 +00:00
- Enable all 15 finance component docs (from .disabled → .mdx) - Create stock-market.mdx, 8 chart docs, 8 block docs, 2 framework docs - Add direction.tsx component (RTL/LTR support from upstream shadcn) - Add xs/icon-xs button sizes, data-variant/data-size attributes - Fix build-registry.mts to handle default exports in namespace re-exports - Add default props to order-entry, positions-list, orders-history, trading-panel - Fix 18 navigation stubs → re-export from root implementations - Add 44 orphaned MDX files to nav (installation, dark-mode, desktop, guides, etc) - Migrate 6 framer-motion imports → motion/react - Bump React 19.2.0→19.2.4, Next.js 16.0.1→16.1.6, motion→12.34.0 - Align lucide-react, sonner v2, tailwind-merge v3, postcss-selector-parser v7 - Remove framer-motion dep (superseded by motion) - Fix @types/react-dom, TypeScript versions across workspaces
54 lines
1.4 KiB
Plaintext
54 lines
1.4 KiB
Plaintext
---
|
|
title: Radar Chart
|
|
description: Radar charts for multivariate data comparison and analysis.
|
|
---
|
|
|
|
## Overview
|
|
|
|
Radar charts display multivariate data on axes starting from the same point, useful for comparing multiple quantitative variables.
|
|
|
|
## Usage
|
|
|
|
```tsx
|
|
import { ChartContainer, ChartTooltip, ChartTooltipContent } from "@hanzo/ui"
|
|
import { PolarAngleAxis, PolarGrid, Radar, RadarChart } from "recharts"
|
|
|
|
const data = [
|
|
{ subject: "Math", A: 120, B: 110 },
|
|
{ subject: "Chinese", A: 98, B: 130 },
|
|
{ subject: "English", A: 86, B: 130 },
|
|
{ subject: "Geography", A: 99, B: 100 },
|
|
{ subject: "Physics", A: 85, B: 90 },
|
|
{ subject: "History", A: 65, B: 85 },
|
|
]
|
|
|
|
const config = {
|
|
A: { label: "Student A", color: "hsl(var(--chart-1))" },
|
|
B: { label: "Student B", color: "hsl(var(--chart-2))" },
|
|
}
|
|
|
|
export function RadarChartDemo() {
|
|
return (
|
|
<ChartContainer config={config}>
|
|
<RadarChart data={data}>
|
|
<PolarGrid />
|
|
<PolarAngleAxis dataKey="subject" />
|
|
<ChartTooltip content={<ChartTooltipContent />} />
|
|
<Radar dataKey="A" fill="var(--color-A)" fillOpacity={0.6} />
|
|
<Radar dataKey="B" fill="var(--color-B)" fillOpacity={0.6} />
|
|
</RadarChart>
|
|
</ChartContainer>
|
|
)
|
|
}
|
|
```
|
|
|
|
## Variants
|
|
|
|
### Filled Radar
|
|
|
|
Use `fillOpacity` to create filled radar areas.
|
|
|
|
### Multiple Series
|
|
|
|
Compare multiple datasets on the same radar.
|