0|

Chart recipes

Documentation Index

Fetch the complete documentation index at: /llms.txt. Use this file to discover all available pages before exploring further.

Data helpers for histogram, Pareto, heatmap, bullet, gauge, and box plot patterns

BI-style charts are built from primitives plus small data helpers in chart-recipes. Install the helpers once, then compose the matching Bee*Chart as documented on each chart page.

Installation

pnpm dlx shadcn@latest add @beecharts/chart-recipes

This copies lib/chart-recipes.ts into your project. Chart components are installed separately (e.g. @beecharts/bar-chart).

Helpers

HelperUse withDoc examples
binForHistogram(values, binCount?)BeeBarChartBar chart → Histogram
prepareBulletRow(label, { actual, target, max? })BeeBarChart layout="horizontal"Bar chart → Bullet chart
prepareParetoData(rows, nameKey, valueKey)BeeComposedChartComposed chart → Pareto
prepareBoxPlotRow(category, samples)BeeComposedChart stacked bars + lineComposed chart → Box plot
prepareHeatmapCells(rowLabels, colLabels, matrix)BeeHeatmapChartHeatmap chart
workloadUtilization(assigned, available)any workload viewReturns utilization %
prepareCalendarWorkloadCells(days)BeeCalendarChartCalendar chart → Employee workload
prepareTeamWorkloadMatrix(dates, rows)BeeHeatmapChartCalendar chart → Team workload
normalizeGaugeValue(value, min?, max?)BeeRadialChart variant="semi"Radial chart → Gauge with target
prepareGaugeRows({ score, target?, … })BeeRadialChart nameKey="series"Same — series keys must match chartConfig

Import

import {
  binForHistogram,
  prepareBulletRow,
  prepareParetoData,
  prepareBoxPlotRow,
  prepareHeatmapCells,
  workloadUtilization,
  prepareCalendarWorkloadCells,
  prepareTeamWorkloadMatrix,
  normalizeGaugeValue,
  prepareGaugeRows,
} from "@/lib/chart-recipes";

Inside this repo, examples use @/registry/lib/chart-recipes.

When not to add a new chart file

If the visualization only changes data shape or props on an existing primitive, extend chart-recipes and add an ex-* example on the primitive doc page — do not create a separate BeeHistogramChart package.