Make your AI a shadcn expert

React Pie Chart with Legend

Pie chart with legend below for category identification

React Pie Chart with Legend preview

Scroll to load preview

Keep the chart clean, explain with legend. This React pie chart uses ChartLegend below the chart instead of labels on segments—maintaining visual clarity while still identifying each category. The legend automatically pulls colors and names from your data via nameKey. Built with Recharts and shadcn/ui, the flex-wrap layout handles many categories gracefully. Perfect for Next.js dashboards where segment labels would overlap, or when you want users to focus on proportions first and details second.

Install with AI

If you've connected the shadcn.io MCP server to Claude Code, Cursor, Windsurf, or any MCP-ready AI editor, prompt your agent to install this chart for you — no copy-paste, no CLI:

use shadcnio to install the pie-legend chart into my project

FAQ

Was this page helpful?

Sign in to leave feedback.