Skip to main content
The Graphy SDK is a grammar-of-graphics charting library, split into two packages:
  • @graphysdk/viz-engine — a framework-agnostic engine. You describe a chart as a spec — a small, immutable object built by composing mappings, geoms, scales and coordinate systems. No DOM, no React.
  • @graphysdk/react-renderer — a React renderer that paints a spec to SVG, and owns layout, theming, formatting and interactivity.
You author a spec once and hand it, together with your data, to the renderer.

1. Install the packages

Because the Graphy packages are private, configure your npm auth token. Create an .npmrc in your repository root (or user-level) with:
.npmrc
Finally, import the renderer’s stylesheet once, near your app’s entry point:

2. Render your first chart

A chart needs three things: your data, a spec describing how to draw it, and the renderer to paint it.

3. Customize the chart

Everything beyond the data-to-ink mapping — titles, axes, legend, appearance — lives in config. Pipe a config(...) item onto the spec:

4. Theme and locale

GraphProvider accepts a theme ('light' or 'dark') and a formattingLocale for number, date and currency formatting:
The sizing prop on GraphRenderer controls how the chart claims space — responsive fills its container, fixed takes explicit width/height, and keepAspectRatio scales to width while preserving a ratio.

Next steps