Introduction
Installation
Next.jsViteLaravelReact RouterRemixAstroTanStack StartTanStack RouterManual InstallationMCP
All componentsTheme
FieldFormInputText FieldTextareaSearch FieldInput OTPNumber FieldNumber FormatSliderCheckboxSwitchRadioSelectCombo BoxList BoxChoice BoxMulti SelectToken FieldNewTag FieldTag GroupCalendarDate FieldDate PickerDate Range PickerRange CalendarTime FieldColor PickerColor FieldColor AreaColor SliderColor SwatchColor Swatch PickerColor ThumbColor WheelDrop ZoneFile Trigger
ButtonButton GroupToggleToggle GroupPreskok Auth Button
EditorHeadingLinkTextKeyboard
CardContainerGrid ListResizableTableTreeSeparatorDescription ListScroll AreaShow MoreToolbar
BreadcrumbsNavbarPaginationTabsSidebar
DialogModalDrawerPopoverPreview TriggerNewSheetTooltipContext MenuDropdownCommandCommand MenuDisclosureMenu
ToastProgress BarProgress CircleMeterLoaderSkeletonNoteBadge
ChartArea ChartBar ChartLine ChartPie ChartRadial ChartRadar ChartBar ListTrackerRecharts ChartsDeprecated
Async ImageAvatarCarouselPreskok Icon
Charts

Pie Chart

Pie and donut chart with a center label that follows the selected slice.

View as MarkdownAsk ChatGPT

Installation

npx shadcn@latest add @preskok/pie-chart

Usage

import { PieChart } from "@/components/ui/preskok-ui/pie-chart"

const data = [
  { name: "Product", amount: 420 },
  { name: "Sales", amount: 310 },
  { name: "Support", amount: 180 },
]

export function PieChartDemo() {
  return (
    <PieChart
      centerLabel="Total requests"
      config={{
        Product: { label: "Product", color: "var(--chart-1)" },
        Sales: { label: "Sales", color: "var(--chart-2)" },
        Support: { label: "Support", color: "var(--chart-3)" },
      }}
      data={data}
      dataKey="amount"
      nameKey="name"
      variant="donut"
    />
  )
}

Features

  • Pie or donut through variant
  • Center label on donuts that shows the total, or the selected slice's value
  • Slice selection from a click or the legend

Line Chart

Line chart for comparing trends across several series.

Radial Chart

Concentric radial bars built on TanStack Charts with tracks, labels, legends, and tooltips.

On this page

Installation
Usage
Features
Weekly request mix
Inbound requests grouped by owning team.
1,440Total requests