# Elicit.js > Elicit.js is a grammar for visual elicitation: declarative charts that people edit to tell you what they think. Each gesture maps back through the chart's scales and writes the dataset. Install with `npm install elicitjs` (ESM-only, `d3` v7 as a peer dependency). Elicit.js 0.5.0-alpha.0 is alpha: expect breaking changes before 1.0. Every page below is also served as Markdown at its `.md` URL. Examples name keywords bare (`barY`, `move()`) and call the docs' `mount(node)`: destructure the keywords from `plot`, `edit`, `elements` or `constraints`, and append `chart.dom()` to your page. ## Start - [Intro](https://elicitjs.github.io/index.md): Elicit.js is a grammar for visual elicitation. - [Getting started](https://elicitjs.github.io/start.md): Install Elicit.js, build an elicitation interface with `Elicit(spec)`, make it editable by putting an `edit` on a channel, and read the answer back through `onChange`. - [Coding agents](https://elicitjs.github.io/start/agents.md): An agent can ask you with a chart instead of a question in words. - [Core concepts](https://elicitjs.github.io/concepts.md): The model behind every elicitation interface: a dataset, marks that encode it, and edits that write it back. ## Data - [Data schema](https://elicitjs.github.io/schema.md): A `schema` declares the output dataset: each field's type, domain, and creation default. - [Scales & channels](https://elicitjs.github.io/scales.md): A data type says what a field *is*: `quantitative`, `categorical`, `ordinal` or `temporal`. - [Constraints](https://elicitjs.github.io/constraints.md): A constraint is a rule over the dataset, so it applies to every edit on every mark. - [Layout](https://elicitjs.github.io/layout.md): A layout settles marks in pixel space after an edit commits, then writes the settled positions and sizes back into the dataset. - [Datasets & linked charts](https://elicitjs.github.io/dataset.md): `Elicit.dataset(spec)` makes a dataset: the rows, the schema, the constraints and the undo history. ## Marks - [Bar](https://elicitjs.github.io/marks/bar.md): `bar` draws one rectangle per row: a categorical band on one axis, and a value on the other, drawn as length from a baseline or as a span (`x1`/`x2`, `y1`/`y2`). - [Rect](https://elicitjs.github.io/marks/rect.md): `rect` draws a rectangle whose extent on each axis resolves separately: a span (`x1`/`x2`, `y1`/`y2`), a fixed pixel size (`width`/`height`) centred on an anchor, a categorical band, or a baseline→value length. - [Tick](https://elicitjs.github.io/marks/tick.md): `tick` draws a line at a value on one axis, spanning the other axis. - [Point & Dot](https://elicitjs.github.io/marks/point.md): `point` draws one dot per row at `x`/`y`, for scatter plots and creatable points. - [Line](https://elicitjs.github.io/marks/line.md): `line` draws a connected path through ordered points, with a draggable handle on each point once the line carries an edit. - [Area](https://elicitjs.github.io/marks/area.md): `area` fills the region under a series. - [Text](https://elicitjs.github.io/marks/text.md): `text` draws one label per row at (`x`, `y`). - [Symbol & Emoji](https://elicitjs.github.io/marks/symbol.md): The `symbol` channel maps a category to a glyph, an emoji or a unicode shape, as `fill` maps a category to a colour. - [Shape (pictograms)](https://elicitjs.github.io/marks/shape.md): `shape()` draws one SVG path per row, centred at its `x`/`y` — a named shape, a pictogram, any path you write. - [Track (length along a route)](https://elicitjs.github.io/marks/track.md): `track()` draws a value as a length along a route: a bar that wraps, coils or curls round a circle. - [Image](https://elicitjs.github.io/marks/image.md): Pictures work as they do in CSS. - [Ellipse](https://elicitjs.github.io/marks/ellipse.md): `ellipse` draws a dot with two radii, `rx` and `ry`. - [Curve](https://elicitjs.github.io/marks/curve.md): `curve` draws a segment bowed off its chord. - [Arc · Pie · Donut](https://elicitjs.github.io/marks/arc.md): `arc` and `donut` draw pie and donut slices. - [Waffle](https://elicitjs.github.io/marks/waffle.md): A waffle shows a quantity per category as a block of countable cells. - [Stacked dots](https://elicitjs.github.io/marks/dotstack.md): `dotStack` draws a dot histogram: each row is one token, and tokens in the same slot stack into a countable column. - [Trend + Band](https://elicitjs.github.io/marks/trend.md): `trend` elicits a parametric line from one row `{ intercept, slope }`, drawn as `y = intercept + slope·x` across the plot. - [Needle](https://elicitjs.github.io/marks/needle.md): `needle` draws a tapered pointer and hub for a gauge or dial. - [Composite & glyph boxes](https://elicitjs.github.io/marks/composite.md): A composite is a glyph: a group of ordinary marks, its `parts`, over the same rows of the dataset. - [Face (emotion)](https://elicitjs.github.io/marks/face.md): `face()` encodes a row's fields as a face. - [Sticker](https://elicitjs.github.io/marks/sticker.md): `sticker()` draws a rounded box with text inside and sizes the box to the text. - [Geo](https://elicitjs.github.io/marks/geo.md): Geo marks place rows by longitude and latitude through a chart-level `projection`, instead of x/y scales. - [Network (nodes & links)](https://elicitjs.github.io/marks/network.md): A network is two tables, nodes and the links between them, declared with `structure: "network"`. - [Hierarchy (nested nodes)](https://elicitjs.github.io/marks/hierarchy.md): A hierarchy is nodes that sit inside each other, declared with `structure: "hierarchy"`: one table of nodes, and a `nesting` table with one row per containment. - [Axis, Grid & Rule](https://elicitjs.github.io/marks/axes.md): Axes and gridlines are chart elements: they draw a scale, not data. - [Radial axis](https://elicitjs.github.io/marks/axis-radial.md): `axisRadial()` draws the `theta` scale as a radial axis: an arc spine, ticks, labels, and optional coloured bands for categories. - [Legend](https://elicitjs.github.io/marks/legend.md): A legend is a key for one encoding: a field on a non-positional channel such as `fill`, `size` or `symbol`. ## Walkthroughs - [Face, plant, hourglass](https://elicitjs.github.io/case-studies/glyphs.md): Three elicitation interfaces built from existing marks and edits: a face whose colour you slide, a plant you grow, and an hourglass you fill. - [Du Bois's wrapped bars](https://elicitjs.github.io/case-studies/du-bois-wrapped.md): W. - [Du Bois's coil and spiral](https://elicitjs.github.io/case-studies/du-bois-spiral.md): Two of Du Bois's charts for the 1900 Paris Exposition do not fold a bar back and forth: they wind it, into a square coil and into a spiral. ## Editing - [Overview](https://elicitjs.github.io/editing.md): An edit writes a gesture back to the data, through the same scale that encodes it. - [Gestures](https://elicitjs.github.io/editing/gestures.md): A transform maps input to a channel's value through that channel's scale. - [Paths & sweeps](https://elicitjs.github.io/editing/sweep.md): Some edits work on a whole line or stack rather than one row. - [Handles](https://elicitjs.github.io/editing/handles.md): Handles are grab targets on continuous shapes: curves, envelopes, partition seams and interval spans. - [Adding, removing & locking rows](https://elicitjs.github.io/editing/existence.md): These edits add and remove rows. - [Selection](https://elicitjs.github.io/editing/selection.md): The selection is the set of rows currently picked. - [Probe & stages](https://elicitjs.github.io/editing/probe.md): `pick: "probe"` previews an edit before it commits. - [Axes and view: rescale, zoom & pan](https://elicitjs.github.io/editing/axis.md): An axis with an `edit` rewrites the field's domain on the schema, where a mark edit rewrites a datum. - [Legend pickers](https://elicitjs.github.io/editing/legend.md): A legend can take input as well as label a scale. - [History & undo](https://elicitjs.github.io/editing/history.md): `chart.undo()` and `chart.redo()` step back and forward one gesture at a time. - [External controls](https://elicitjs.github.io/editing/external-controls.md): Drive a chart from a control outside it: an input, a `