Loading...
Loading...
Build highly expressive charts with Graphy's viz stack (@graphysdk/react; advanced embedding via @graphysdk/viz-engine + @graphysdk/react-renderer). Also covers installing and setting up the SDK in a React codebase.
npx skill4agent add graphysdk/skills graphy-charts@graphysdk/react<GraphProvider><GraphRenderer>@graphysdk/viz-engine@graphysdk/react-rendererreference/react-api.mdpointlineareabarruletilecountsummeansmoothidentitystackdodgefillbarposition: 'fill'coord.polar({ theta: 'y' })innerRadiuscoord.flip()lineareacoord.polar({ theta: 'x' })geom.rule()stat.smoothstat.meantransform.filtertransform.sorttransform.aggregatetransform.reshapetransform.constantrowsreference/spec-api.mdscale.x()scale.y()colorstyles({ tokens, defaults, overrides })reference/styling.mdDataSpecCompiledSpecimport { createSpec, pipe, mapping, geom, scale, GraphProvider, GraphRenderer } from '@graphysdk/react';
const data = {
columns: [{ key: 'month' }, { key: 'revenue' }],
rows: [
{ month: 'Jan', revenue: 1200 },
{ month: 'Feb', revenue: 1850 },
{ month: 'Mar', revenue: 1600 },
],
};
const input = pipe(createSpec(), mapping({ x: 'month', y: 'revenue' }), geom.bar(), scale.x(), scale.y());
export function RevenueChart() {
return (
<GraphProvider data={data} input={input}>
<GraphRenderer />
</GraphProvider>
);
}reference/install.mdreference/cdn.md@graphysdk/viz-engine@graphysdk/react-renderer@graphysdk/react'@graphysdk/react'config()styles({ ... })reference/styling.mdthemeOverridesGraphProviderslotsGraphRendererdefineGeomRenderercreateGraphyKitrecipes/themes/reference/storytelling.md| I want to… | Read |
|---|---|
| Install the SDK, or fix a failed install (peer errors, unstyled graph, missing types) | |
Use the SDK on a page with no bundler or npm ( | |
See the full spec builder API and every | |
| Check the exact signature, option keys, or accepted values of an exported symbol | |
Filter, sort, aggregate or derive data inside the spec ( | |
Understand the | |
| Render in React: provider/renderer props, sizing, locales, error handling | |
| Recolor geoms; restyle grid, tick lines, panel border, graph background, label typography | |
| Restyle the legend, tooltip, headline and footer chrome via theme tokens | |
| Replace the header, footer, tooltip, legend, grid, or axis ticks | |
| Annotate, highlight, add reference lines/trendlines/headline numbers/data labels | |
| Compare two values or periods, show a change/gap/drop (difference arrows) | |
| Author plugins: repaint a built-in geom or define a new one | |
| Bar or column chart (grouped, stacked, 100%, horizontal, negative) | |
| Line chart (multi-series, dash styles, smoothing, missing values) | |
| Area chart (stacked, flipped) | |
| Scatter or bubble chart | |
| Pie or donut chart | |
| Radar / spider chart | |
| Rose or racetrack (polar bars) | |
| Combo chart, dual y-axes | |
| Heatmap, matrix, cohort grid, waffle | |
| Apply a complete house style | |
| Repaint a built-in geom's marks | |
| Minimal custom geom to model a new one after | |
| Custom geom with two marks per observation | |
| Custom positional aesthetics (open/high/low/close) | |
| Custom layout + hit-testing geometry | |
| Simulation-driven or pointer-owning geoms | |
| Multi-part flow geometry | |
| Check a spec compiles before rendering | |
ThemeOverridesconfig()| Theme | Look | File |
|---|---|---|
| Braun | Dieter Rams minimalism: warm greys, ink pill bars, no grid, one orange accent | |
| Financial Times | FT editorial: salmon paper, claret + Oxford blue, color-keyed headlines | |
| International | Newspaper style: white plates, ink-and-grey series, one red accent | |
| Lenny's Newsletter | Warm newsletter: cream grounds, rounded corners, autumn orange ramp | |
| Neo Brutalist | Near-black sheets, dashed borders, acid | |
| Mexico 68 | Olympic op-art: magenta-led palette, concentric outline marks (plugin tier) | |
scripts/validate-spec.mjs{ data, input }node scripts/validate-spec.mjs path/to/my-spec.mjskeylabelGraphRendererGraphProviderpluginsGraphProviderkeystylesstyle.geom(decls, { where }){ layer }themeOverridesparams@graphysdk/react-renderer/editableEditableGraphRendererEditorPanelmode="editable"GraphRenderergraphy-editor