Skip to main content
Start with @graphysdk/react. One package builds the spec and renders the chart. The “Powered by Graphy” mark is on by default.

1. Install the package

A few things the install expects from your project:
  • React 19react@^19.0.0 is a peer of the package.
  • Nothing else for a read-only chart — the rich-text editor behind the editing surface is an optional peer, so a chart you only paint pulls in no @tiptap/* package. See Editing if you mount one.
  • moduleResolution: "bundler" (or node16 / nodenext) in your tsconfig.json — the packages ship an exports map, which the legacy "node" resolution skips.
  • A bundler that processes CSS imports from node_modules — Vite, Next.js and webpack with css-loader all do. There is no stylesheet to import: each entry point injects its own CSS.

2. Render your first chart

A chart needs three things: your data, a spec describing how to draw it, and the React surface to paint it — all from @graphysdk/react.

3. Customize the chart

The chart’s chrome — titles, axes, legend, layout — lives in config. Pipe a config(...) item onto the spec:

4. Restyle it

Paint — colors, stroke widths, corner rounding, fonts — lives in a stylesheet on the spec. Pipe a styles(...) item in the same way. Redefining a built-in token restyles every default that reads it; a style.* entry targets one thing:
Because it sits on the spec, the stylesheet serializes and travels with the chart. See Styling for the full set of targets and the cascade that resolves them.

5. Color scheme and locale

GraphProvider accepts a colorScheme ('light' or 'dark', defaulting to 'light') and a formattingLocale for number, date and currency formatting:
GraphRenderer takes a handful of props of its own:
  • sizing — how the chart claims space. responsive fills its container, fixed takes explicit width/height, and keepAspectRatio scales to the container width from an intrinsicWidth + intrinsicHeight (or either one plus an aspectRatio).
  • animationtrue by default. Pass false to turn intro and transition animation off, or an object ({ intro, transitions }) to tune each; intro accepts enabled, durationScale, stagger, staggerOrder and maxAnimatedGeoms. A reduced-motion preference disables animation regardless.
  • showTooltipstrue by default.
  • slots — per-region component overrides. See Slots.

Editing

@graphysdk/react/editable mounts a rich-text editor over the chart’s title, caption and text annotations, and it is built on TipTap v3. Those packages are declared as optional peers so a read-only install skips them; add them yourself when you import that entry:

Using the engine and renderer separately

If you want the mark off, or you are not in React, import those packages yourself:

Next steps