Command Palette

Search for a command to run...

Pie Charts Showcase

A comprehensive set of interactive Pie Chart components for the Saudi National Design System (NDS / DGA).

Installation

pnpm dlx shadcn@latest add https://nds.aboalrejal.com/r/chart.json

Interactive Preview & Code

Pie Chart
Pie Chart - Interactive
January - June 2024
Pie Chart
Pie Chart
January - June 2024
Trending up by 5.2% this month
Showing total visitors for the last 6 months
Pie Chart
Pie Chart - Donut
January - June 2024
Trending up by 5.2% this month
Showing total visitors for the last 6 months
Pie Chart
Pie Chart - Donut Active
January - June 2024
Trending up by 5.2% this month
Showing total visitors for the last 6 months
Pie Chart
Pie Chart - Donut with Text
January - June 2024
Trending up by 5.2% this month
Showing total visitors for the last 6 months
Pie Chart
Pie Chart - Stacked
January - June 2024
Trending up by 5.2% this month
Showing total visitors for the last 6 months
Pie Chart
Pie Chart - Legend
January - June 2024
Pie Chart
Pie Chart - Label
January - June 2024
Trending up by 5.2% this month
Showing total visitors for the last 6 months
Pie Chart
Pie Chart - Custom Label
January - June 2024
Trending up by 5.2% this month
Showing total visitors for the last 6 months
Pie Chart
Pie Chart - Label List
January - June 2024
Trending up by 5.2% this month
Showing total visitors for the last 6 months
Pie Chart
Pie Chart - Separator None
January - June 2024
Trending up by 5.2% this month
Showing total visitors for the last 6 months

Dynamic Props Usage

All chart components accept dynamic data and config props while maintaining default fallbacks:

import { ChartPieInteractive } from "@/registry/dga/charts/chart-pie-interactive"

const customData = [
  { month: "Jan", value: 400 },
  { month: "Feb", value: 700 },
  { month: "Mar", value: 1200 },
]

const customConfig = {
  value: {
    label: "Metrics",
    color: "var(--chart-1)",
  },
}

export default function PieChartOverview() {
  return (
    <ChartPieInteractive
      data={customData}
      config={customConfig}
      title="Annual Analytics Report"
      description="Regional Statistics 2024"
      trendingText="Trending up by 12.5% this period"
    />
  )
}