For the complete documentation index, see llms.txt. Markdown variants are available by appending .md to any URL or sending an Accept: text/markdown header. An agent skill is available at /.well-known/agent-skills/site-skill.md.
/
0
Sponsor

Graph

Bar, line, and area charts drawn with SVG.

Installation

$ pnpm dlx shadcn@latest add @pdfcn/forme/graph

Usage

import { PdfGraph } from "@/components/pdf/graph";
<PdfGraph variant="bar" data={[{ label: "Q1", value: 30 }]} />

Variants

<PdfGraph variant="line" data={series} showDots smooth />
<PdfGraph variant="donut" data={totals} centerLabel="$48k" />

API Reference

PdfGraph

PropTypeDefault
variant'bar' | 'horizontal-bar' | 'line' | 'area' | 'pie' | 'donut''bar'
dataGraphDataPoint[] | GraphSeries[]-
titlestring-
subtitlestring-
xLabelstring-
yLabelstring-
widthnumber420
heightnumber260
fullWidthbooleanfalse
colorsstring[]theme
showValuesbooleanfalse
showGridbooleantrue
legend'bottom' | 'right' | 'none''bottom'
centerLabelstring-
showDotsbooleantrue
smoothbooleanfalse
yTicksnumber5
noWrapbooleantrue
styleStyle-