ggaction

A grammar for how charts are made.

Most visualization grammars describe a finished chart. ggaction represents chart authoring itself as an immutable, traceable sequence of graphical actions.

Build, inspect, select, and revise charts one meaningful action at a time.

Start with a complete example, then use the API pages when you need to customize one part. The main, basic, extension, SVG, PNG, and PDF entry points include TypeScript declarations.

Experimental 0.0.12 · APIs may change before 1.0.0. Review the changelog when upgrading.

Start here

Build your first chart Install the package, render a complete chart, and understand the action chain. Start from a chart type Copy the shortest supported scatterplot, line, bar, or area flow. Find an action Look up exact signatures, defaults, inference, and related guides. Connect an LLM locally Use one read-only MCP search tool without preloading the full documentation.

Common chart types

Start with common Cartesian charts for relationships, comparisons, trends, and distributions.

Statistics and uncertainty

Compose ordinary marks and derived data into higher-level statistical views.

Alternative coordinates

Use parallel axes or angle and radial distance when Cartesian x and y are not the clearest structure for the comparison.

Go deeper

Understand immutable ChartProgram state, semantic and graphical state, and action trace trees. Extension authors can continue with action authoring and the primitive API. For boundaries and failures, see supported features and troubleshooting. Language models can use the concise documentation index, the local read-only MCP server, or the generated full-text bundle.

Source, issues, and development history are available on GitHub.