Command Palette

Search for a command to run...

Bar Charts Showcase

A comprehensive set of interactive Bar 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

Bar Chart
Bar Chart - Interactive
Showing total visitors for the last 3 months
Bar Chart
Bar Chart
January - June 2024
Trending up by 5.2% this month
Showing total visitors for the last 6 months
Bar Chart
Bar Chart - Horizontal
January - June 2024
Trending up by 5.2% this month
Showing total visitors for the last 6 months
Bar Chart
Bar Chart - Multiple
January - June 2024
Trending up by 5.2% this month
Showing total visitors for the last 6 months
Bar Chart
Bar Chart - Stacked + Legend
January - June 2024
Trending up by 5.2% this month
Showing total visitors for the last 6 months
Bar Chart
Bar Chart - Negative
January - June 2024
Trending up by 5.2% this month
Showing total visitors for the last 6 months
Bar Chart
Bar Chart - Mixed
January - June 2024
Trending up by 5.2% this month
Showing total visitors for the last 6 months
Bar Chart
Bar Chart - Label
January - June 2024
Trending up by 5.2% this month
Showing total visitors for the last 6 months
Bar Chart
Bar Chart - Custom Label
January - June 2024
Trending up by 5.2% this month
Showing total visitors for the last 6 months
Bar Chart
Bar Chart - Active
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 { ChartBarInteractive } from "@/registry/dga/charts/chart-bar-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 BarChartOverview() {
  return (
    <ChartBarInteractive
      data={customData}
      config={customConfig}
      title="Annual Analytics Report"
      description="Regional Statistics 2024"
      trendingText="Trending up by 12.5% this period"
    />
  )
}