Manual

Contents: What boardplot is, The spec, Choosing a chart, Bartable totals, Getting a chart with MCP, Getting a chart with the CLI, Getting a chart in React, Story steps, Notes under the chart, Sizing, Reading errors and warnings, Position of bar value labels, Moving text and drawing on a chart, Log scales on a line, Named reference bands on a line, Times and numbers on the x axis of a line, Calendar ticks on dated categories, Themes, Where the reference is.

To have an AI agent build a slide deck, an analysis page, a React dashboard or a report with boardplot charts, start with Use cases.

What boardplot is

Boardplot draws consulting-grade charts: 37 chart types, tables and maps among them, with every label placed by one collision solver. The output is deterministic SVG or a React component, so the same spec gives the same drawing byte for byte. Totals, differences, shares and growth rates are computed from the data, and each render reports the numbers the engine derived.

The spec

Every chart is one JSON object, the spec.

{
  "name": "revenue-mix",
  "type": "column",
  "data": {
    "categories": ["2021", "2022", "2023", "2024", "2025"],
    "series": [
      { "id": "subscriptions", "label": "Subscriptions", "values": [62, 74, 88, 103, 121] },
      { "id": "services", "label": "Services", "values": [38, 41, 43, 44, 46] }
    ]
  },
  "annotations": [{ "kind": "cagr" }],
  "options": {
    "variant": "stacked",
    "title": "Subscriptions carry the growth",
    "subtitle": { "measure": "Revenue by line" },
    "unit": "$m"
  },
  "theme": "bridge"
}

options.valueAxis.tickStep sets ticks at multiples of a positive step and extends the linear axis outward without cutting data, except that dot keeps its data ends when at least two multiples fit inside. The step must give 1 to 20 intervals, otherwise nice ticks are drawn with tick-step-ignored.

Use boardplot_describe with a field path to check whether a type accepts a setting. Compact responses omit shared option details. boardplot_render, boardplot_measure, the CLI and the React component BoardplotChart take the same spec.

A KPI accepts data.label: "" to omit its label and the space for the label. The accessible name falls back to KPI.

Where the chart supports sorting, options.sort: "sheet", "asc", "desc" or "reverse" sets sort.categories. sort: true means { categories: "desc" }. A positive integer options.topN: n means { n }. Charts keep their existing restrictions on sorting and Top-N.

Choosing a chart

The table maps a frequent business message to a boardplot type, the most common first. Get the fixture with boardplot_fixtures and the type and id, then change the data. The table does not decide what the exhibit should show; that stays the author's choice.

MessageType and key optionsFixtureCommon pitfall
Actual vs plan per periodgrid, sharedAxis: "category": a column panel with AC and the PL series as role: "reference", a variance panel with variant: "absolute" and variance: { vs: "pl" }. The ΔPL tier stands over the columns; variancePosition: "below" puts it under themweekly-actual-vs-plan, weekly-actual-vs-plan-variance-belowAC and PL as grouped columns: the reader must find each gap by eye.
Actual vs prior yearcolumn, variant: "stacked", one PY series with role: "reference"; for ΔPY tiers, grid with variance panelsintegrated-stacked-variance, three-tierA PY series without role: "reference" draws as one more data series.
Rankingbar, sort: { categories: "desc" }margin-by-brandColumns with long category names; a bar keeps the names on one line.
Trend against planline, the actual series and a plan series with scenario: "PL", gapFill between themoption-cost-gapgapFill tones follow the order in between: with the cost named first, above plan is bad, so set positiveTone: "bad".
KPIs and a margin statement by channel over weeksdimswitch, dimension.sums: true, measures with a value formula over the sums, partOf and result for the statement linesstatement-channelsA rate in the sums: the Total adds it up across the channels. Put counts and amounts in the sums, and let the formula divide.
Revenue report by segment against prior year and plantable, variant: "hierarchy", one columnGroups block per period, computed YoY and vs-plan columnsmanagement-report-compactA typed percentage column: parent rows add up the children's percentages. A computed column derives each row's own ratio.
Bridge: what moved the numberwaterfall, items[].type "total" at both ends, deltas between; pvm for price, volume and mixebit-bridgeA typed end total: Boardplot sums the deltas, and a total value that differs warns derived-mismatch.
Mix or sharecolumn, variant: "stacked100"stacked100-energy-mixA pie with more than six slices gets the advice pie-too-many-slices, and pies do not compare periods.
KPI overviewkpi with data.delta: { vs, scenario } per card; for many metrics, table with variant: "steering"arr-card, steering-monthlyA long row of cards where one table compares the metrics.
Status reviewstatus, options.states with a tone each and a pattern on the at-risk stateprogramme-rollout-ragTone alone: a state without a pattern is lost in a grayscale print.
Distributionhistogram for one group, box for severalorder-value-distribution, deal-size-by-regionA column of averages hides the spread and the skew.
Correlationscatter, trend: trueprice-volume-trendThe trend line shows association, not cause; r² comes back in the render's reading, not on the chart.

Bartable totals

The bartable Total adds the rows given; if you cut rows, send a residual row with the rest or rename the Total through options.strings.total.

Getting a chart with MCP

Call boardplot_render directly when you have a valid spec. Use boardplot_describe to learn a known type, or boardplot_list to choose a type. Each tool returns JSON with ok, engineRev and version. A rejected call returns ok: false and an errors list. version identifies the running build, as boardplot --version does for the CLI.

Draw a chart

This call requests an EBIT bridge as PNG:

{
  "name": "boardplot_render",
  "arguments": {
    "format": "png",
    "spec": {
      "type": "waterfall",
      "data": {
        "items": [
          { "id": "fy24", "label": "EBIT FY24", "type": "total", "value": 120 },
          { "id": "price", "label": "Price", "value": 18 },
          { "id": "volume", "label": "Volume", "value": 9 },
          { "id": "cost", "label": "Input cost", "value": -14 },
          { "id": "fy25", "label": "EBIT FY25", "type": "total" }
        ]
      },
      "options": { "title": "Price gains outweigh higher input cost", "subtitle": { "measure": "EBIT" }, "unit": "$m", "source": "Finance, FY25 close" }
    }
  }
}

The fy25 item has no value, so boardplot computes the FY25 total as 133. When a total has a supplied value, boardplot checks that value against the sum. A mismatch produces derived-mismatch and draws the computed total.

A successful PNG render returns an image content block and JSON such as this excerpt. With outDir and return: [] it writes the files and returns only their paths in outputs, with no image block. Check the actual output before placing it: a PNG request can fall back to SVG. PNG output explains the conditions.

{
  "ok": true,
  "size": { "width": 720, "height": 482 },
  "reading": {
    "type": "waterfall",
    "labelsDropped": 0,
    "derived": [{ "claimId": "wf:total:fy25", "operation": "waterfall total", "displayed": "133", "value": 133 }]
  }
}

Choose a tool

ToolUse whenResult
boardplot_renderA spec is ready to drawValidation, a reading of the chart, warnings, optional SVG markup or a requested PNG image
boardplot_describeYou need the fields for a known chart typeData and options, a starter spec, size floors, annotations and fixture IDs
boardplot_listYou need to choose a chart typeTypes, use cases, aliases, variants, shared options, themes and supported alternatives
boardplot_fixturesYou need a complete exampleRunnable specs, filtered by type or retrieved by type and ID
boardplot_measureThe chart must fit a known container, or rendering reports a size problemMinimum, natural and comfortable dimensions at the requested width
boardplot_feedbackBoardplot fails, refuses valid input or draws something misleadingA draft report and prefilled issueUrl for the user to review and submit. Nothing is sent

Read a chart contract

For a known type, request its compact contract:

{ "name": "boardplot_describe", "arguments": { "type": "waterfall" } }

The response includes a starter spec and the type's data and option fields. sharedOptions names additional accepted shared options. The response defines value cells and annotation anchors when it uses those concepts. A field omitted from the compact option rows can still be supported.

Retrieve examples

Call boardplot_fixtures with type to list examples of that chart type. Retrieve a chosen fixture with its type and id, then replace the example's data and text. An ID is unique within its chart type.

Listings return up to 25 fixtures. When nextCursor is present, pass it as cursor with the same type and kind to retrieve the next page. Omitting type lists examples across all types. kind filters listings to example (default), torture (stress cases) or all. Retrieving a specific ID bypasses the kind filter.

Read a render result

Check ok, warnings and reading before using the chart. reading reports the drawn series, label counts, omitted content and computed values. Image content carries PNG, svg carries inline SVG, and outputs lists written files.

Each derived reading has visible: true when it has displayed text. displayed is always the text printed on the chart. A calculation that is not printed has visible: false and displayed: "Not displayed". Where a chart type states a value in words, such as a status count ("Done 6") or a waffle segment ("41.3% = 41 of 100 cells"), the optional description holds those words. reading.omissions lists each hidden label and its destination. This includes axis labels removed before placement and values moved straight to a note. A label without a replacement label or note has destination reading.omissions, which keeps its text. One label-hidden warning reports the missing labels for the chart. Redundant labels, whose information is printed elsewhere, do not cause this warning.

A treemap leaves out items whose value is zero or null, warns treemap-item-left-out and names the items in a note. Only drawn items enter totals, shares and cell counts; negative values and data without a value above zero are refused.

A slope with more than two categories draws the first versus the last, warns slope-too-many-points and names the omitted category labels in a note. The diverging slope still requires exactly two categories.

A football field leaves out methods whose cells are null or have no range, warns football-field-method-without-range and names the methods in a note. At least one method must have a range; only those methods enter sorting, the scale and computed numbers.

reading.counts lists structural counts and their exact phrases in the accessible description. A host can match these phrases without parsing prose. See Chart reading counts.

Output settings

ArgumentMeaning
formatRequested svg or png. Without an explicit format, a .svg or .png output filename selects the format. Otherwise the default is SVG with a reading-only response
returnResponse fields. Default ["reading"]. Add "svg" for inline markup
outDirAbsolute output directory, or a .svg or .png file path for one chart. Omit it when files are unnecessary. outputs lists the paths written
overwriteDefault false: a taken filename gets a numbered suffix. true replaces existing output files
targetReading context: report, dashboard, slide or print. See Sizing
width, heightLayout pixels. Put pt or mm dimensions in spec.options.size with unit
scalePNG device pixels per layout pixel. Default 2
backgroundDefault theme. transparent omits the canvas, while halos and hollow marks retain the theme background color. Use a display surface of that color

PNG output

PNG rendering uses the optional @resvg/resvg-js package, or Chrome or Chromium. Boardplot checks the usual browser paths and BOARDPLOT_CHROME_PATH. With no rasterizer, boardplot returns SVG and the warning no-rasterizer.

On Linux, resvg uses the first installed family in the theme stack, then tries Liberation Sans, Arimo, Nimbus Sans, DejaVu Sans or Noto Sans. Without those fonts, Chrome draws the PNG. If Chrome is unavailable too, boardplot returns SVG with raster-fonts-missing.

Characters missing from the theme's width tables, such as emoji or CJK, use Chrome when available. Chrome clears the coverage warning on macOS and Windows, which ship those fonts. On other systems, png-glyph-coverage remains because the installed fonts may still lack the glyphs. Without Chrome, boardplot keeps the resvg PNG and warns png-glyph-coverage, naming labels that can be lost.

Boardplot accepts a browser PNG only when it decodes at the requested size, even if the browser exits with an error. A failed browser export is retried once, then returns png-export-failed with exit code 2. The error names a start failure, the 60-second timeout, a crash, or the browser's exit code and last output line.

A PNG above 100 million pixels (width × height × scale²) is refused with png-too-large and exit code 1. Lower scale, reduce the canvas, or use SVG. boardplot_list reports the limit as limits.pngPixelsMax. PNG records 96 × scale dpi. Deck guidance explains placement in slide and document tools.

Size warnings and refusals

A size refusal includes expected.minimum and fix when boardplot found a size that fits. Library canDraw() returns the estimate as minimum. CLI and MCP measurement can return ok: true with a non-null refused result. Check refused.required for verified dimensions when present, or follow refused.suggest.

A drawn chart can report plot-under-floor, aspect-cap, height-off-ladder or plot-under-min without a fix. Render has not drawn the height that a repair would name. Follow suggest: measure a verified size, omit the height, or widen the chart for an aspect warning.

Measurement draws each size it names. For plot-under-floor and refusals, measurement names a size that draws without a size warning. For aspect-cap, height-off-ladder and plot-under-min, measurement tries the allowed standard heights, nearest first. A fixed-height table that extends beyond its frame reports table-overflow. Measurement names the width and height the wider frame needs. A data warning such as dual-axis does not reject a size.

The height search is bounded. When no tested size fits, the warning has no fix. Follow suggest to reduce content, widen the chart or change a setting.

Accepted input forms

Plain numeric strings such as "120", "-3.5" and "1e3" are accepted where the schema needs a number, after trimming whitespace. The conversion uses Number(text) and refuses more than 15 significant digits, overflow and underflow to zero. Strings with grouping marks or units stay refused. Grouping and decimal marks come only from options.locale; "1,200", "1.234", "12%" and "$5" are not guessed. Boolean options accept "true" and "false" in any case. Numeric id fields in data become strings. Chart types, aliases and enum values accept a unique case-insensitive match, including grid panel types and the CLI/MCP format, target, background and return arguments. Names are not trimmed or respelled. Table status cells accept green as on-track, amber or yellow as at-risk, and red as off-track. Status keys and traffic-light words accept any case; column labels still control display text. Scenario LY means PY (last year), in any case. Value conversions report input-converted with a JSON Patch fix that writes the converted value. MCP render and measure parse an object spec sent as a JSON string and report spec-parsed-from-string. Invalid JSON and non-object results stay refused. Explicit --format svg or MCP format: "svg", without return or an output path, includes the SVG and reports svg-returned. An omitted format keeps the reading-only response.

Rows as data

For supported chart types, boardplot_render and boardplot_measure can fill one bare spec from a query result. Pass either inline rows or rowsFile, never both. A versioned document of several charts does not take row input. Category charts use one row per category and series pair. rowsFile is the absolute path of a local .json file (an array of row objects), or a .csv, .tsv or .txt file (a header row) of at most 10 MB. A CSV whose header line holds more semicolons than commas is read as semicolon-separated, as German-locale exports are, and a file whose header line holds more tabs than commas and semicolons is read as tab-separated, as a table pasted from a spreadsheet is; a tab-separated file keeps the dot as its decimal mark. In a semicolon file the value column reads a decimal comma as a decimal (0,505 is 0.505); a number with grouping marks such as 1.234,5 is refused with its row, and so is 1.234, which could be 1234 or 1.234. A leading byte order mark is skipped. Read from a file, the numbers never pass through the model.

For category charts, columns maps roles to source field names, such as { "category": "region", "series": "product", "value": "revenue" }. category, series and value are required, categoryLabel, seriesLabel, unit, date and state (na, nm or suppressed for a cell whose value is null; a heatmap keeps it as the series' states) are optional. Each role names its own column, with one exception: date may name the category column, so one SQL date column gives both the category ids and their dates. A category without a categoryLabel gets no label, so an ISO date id such as 2026-01-01 prints as a short date ('Jan', with the year on its own row) on the axis and in the hover card.

valueKind says how the value column is written: number (the default), percent (50.5 is 50.5 %) or fraction (0.505 is 50.5 %). Table, histogram, box and Sankey row mappings accept number only.

The MCP server reads a rowsFile only from an allowed folder. The allowed folders are the roots the client sends (the server asks for them when the client declares the roots capability), the server's working directory (unless it is the filesystem root), the system temp folder, and every folder in the environment variable BOARDPLOT_ROWS_ROOTS (several separated by :, on Windows by ;). The check runs on the resolved path, so a symlink that points outside is refused too. A file outside these folders is refused with rows-outside-roots, and nothing is read. outDir follows the same rule: a path outside these folders, also through a symlinked folder, is refused with out-outside-roots, and nothing is written. The CLI's --rows and --out take any path you name.

{
  "name": "boardplot_render",
  "arguments": {
    "spec": { "type": "column", "data": { "series": [{ "id": "Online", "label": "Online shop", "colorRole": "highlight" }] }, "options": { "title": "Online holds half of North" } },
    "rows": [
      { "region": "North", "channel": "Online", "share": 0.5 },
      { "region": "North", "channel": "Retail", "share": 0.5 },
      { "region": "South", "channel": "Online", "share": 0.38 },
      { "region": "South", "channel": "Retail", "share": 0.62 }
    ],
    "columns": { "category": "region", "series": "channel", "value": "share", "valueKind": "fraction" }
  }
}

The rows here are inline; "rowsFile": "/data/exports/channel-share.csv" in their place reads the same columns from a file. An absent category/series pair becomes null, which means unknown. A composition with a missing component withholds its share labels. When the source proves that a pair has no value, supply an explicit zero row. For example, { "category": "A", "series": "S1", "value": 12 } and { "category": "A", "series": "S2", "value": 0 } form a complete composition under columns: { category: "category", series: "series", value: "value" }. Keep unknown pairs as null.

A repeated CSV header warns rows-header-repeated: the first column keeps the name, and the next reads as name.1, name.2 and so on.

For category charts, the rows become the spec's data.categories and data.series, in the order they first appear. A category or series the spec already names keeps its other fields, such as a label or a colorRole, so a spec works as a template the rows refill; a column the map names wins. Rows fill one bare spec of a type whose data is categories and series (bar, bartable, butterfly, column, combo, dot, funnel, heatmap, line, mekko, pie, slope, variance). A bartable takes the categories as its table rows and the series as its bar segments, and the value column fills one panel. The spec's first panel is the template for that panel: the panel keeps its id, label, unit, weight, format and aggregate. Without a template, the panel's id is the value column's name. The rows drop the template's ends, any other panel and the number columns, because these lists hold one value per authored row. Percent values fill the panel as plain numbers, and the panel unit becomes % when neither the rows nor the template name a unit. The panel adds its segments, so rows with two different units, percent values beside plain numbers, or a value cell with more than its number (such as a format) are refused at their row. A pair that appears twice, a text value, a state beside a value and a named column no row has are refused with the row that holds them, and rows with no data row (a CSV with only its header, an empty array) are refused as rows-empty. The reading gains data: the row count, the sha256 of the file bytes (of the canonical JSON for inline rows), the source, the columns nothing read and the cells a state suppressed. boardplot_measure returns the same data.

A number in a category, series or other text column reads as its text, as a CSV cell does, so "year": 2024 names the series 2024.

Waterfall and scatter rows

Waterfall (alias bridge) takes one row per item. Use --columns label=item,value=amount,type=kind, or the MCP object columns: { "label": "item", "value": "amount", "type": "kind" }. label and value are required. The optional type column uses the waterfall names delta, subtotal, and total; an absent or blank type means delta. Row order is item order. A delta adds its value. An opening total sets the starting value. Later subtotals and totals use the running sum; their supplied value is a check value. A mismatch warns derived-mismatch and draws the running sum. Use null or a blank value for a total with no check value.

Scatter (alias bubble) takes one row per point. Use --columns x=effort,y=output,size=volume,label=item,group=team, or the same roles in the MCP columns object. Only x and y are required. size supplies bubble magnitude. label supplies the point name. group fills points[].group and creates data.groups in first-appearance order. A matching group in the spec keeps its label and style. With no group column, the spec's groups stay as authored. With no label column, point labels use their generated ids.

Sankey takes one row per link, the shape of a GROUP BY source, target result. Use --columns source=from_page,target=to_page,value=visits, or the same roles in the MCP columns object. source, target and value are required. For flows between segments month to month, add sourceStage and targetStage (for example the month and the next month): then a node is the pair of stage and id, so the same segment in two months is two nodes. A numeric id is read as text. Rows with the same ends add up. Sankey accepts valueKind: "number" only. To label flows as shares, keep numeric counts and use options.nodeValue: "share".

The waterfall and scatter mappings generate ids row-1, row-2, and so on. Labels can repeat. Rows replace data.items or data.points; other authored data stays in the spec. Named columns must exist in the source. Invalid cells report their source row and column. The reading and measure report the row count, SHA-256 and ignored columns, as for category rows. valueKind applies to the waterfall value or both scatter coordinates; bubble size stays a number. For different coordinate kinds, pass numeric cells in JSON rows and set each axis format in the spec. These mappings work with CLI render/measure and MCP boardplot_render/boardplot_measure, for inline rows and JSON or CSV files.

Table rows

Table (alias tbl) takes one row per table row. The spec's data.columns declares the columns; the engine infers no column from the rows. Each value, text, status or date column reads its cells from the source field with the same name as the column id. The rowLabel column shows the row label, which comes from the label role. computed and encoding columns keep their definitions and read no source field. Use --columns label=region,id=code, or the MCP object columns: { "label": "region", "id": "code" }. Both roles are optional; without id, the rows get the ids row-1, row-2, and so on. A table takes no valueKind other than number: write a percent column in points and give it a percent format.

A date column takes ISO date cells. Its format takes a pattern such as dd.MM.yyyy or an example such as 30.09.2026, 09/30/2026, September 2026 or 2026. Month and weekday names can be English or the names of options.locale.language. Quarter tokens are Q (1), QQ (Q1) and QQQ (Quarter 1). Excel mmm, mmmm and dd/mm/yyyy work. YYYY/YY mean year and D/DD mean day. Numeric dates use a day above 12 to choose the order. Otherwise they read day first and warn date-format-ambiguous. A year in front keeps year/month/day. A month name with a two-digit year, such as Sep-26, reads month/year. A space or comma warns when the year could be a day. FY26 reads the calendar year and gives date-format-fiscal-year (info). A fiscal year starting in another month is not supported. Unreadable text warns date-format-unknown and uses the default d MMM yyyy. Warnings name the column's format once per column.

Numbers, text, null and table cell objects pass through as cells, and a field that a row lacks becomes null. Only a value column reads CSV text as a number, with the decimal comma of a semicolon CSV. A column whose field no row has, text that a value column cannot read as a number, a boolean or other invalid cell, and an empty or repeated row id are refused with the source row and field; a table warning about a source cell names that row and field too. Rows keep their source order and columns keep the spec's order. A spec row with the same id keeps its authored fields, such as role, parentId, calc or format, so totals, hierarchy and formulas stay in the spec; spec rows that no source row names are not drawn, and a drawn row whose parentId or calc names such a row is refused at that spec field. The reading reports the source fields that no column and no role reads in ignoredColumns.

Histogram and box rows

Histogram (aliases distribution, frequency) takes one row per observation: --columns value=days, or columns: { "value": "days" }. Box (aliases boxplot, box-and-whisker) takes one row per observation and groups the rows by the category column: --columns category=team,value=days. category and value are required; the optional categoryLabel and date give each group its label and observation date, and date may name the category column. Groups keep the order in which they first appear. A group the spec already names keeps its other fields. A group with two different labels or two different dates, a label or date that is not text, and a repeated group id in the spec are refused.

Every row is an observation, so nothing is dropped without a word. A null, blank, non-numeric or non-finite observation is refused with missing-value or invalid-value and its source row and field; remove or fix those rows before the call. A histogram still needs at least four observations. These shapes take no valueKind other than number; set the number format in the spec options.

Map rows and classes

Choropleth and tilemap accept the same rows and rowsFile inputs. Set columns: { "category": "area", "value": "score" }. Each row supplies one region. Keep data.pack and any data.overlays in the spec. Maps accept state and valueKind; region names come from the pack, so other column roles are refused. Region ids match without regard to case, with exact matches first. Unknown ids are left out with a warning and a note; a map whose listed ids are all unknown is refused. Duplicate regions and invalid values are refused. The reading includes the row count and SHA-256, as for category charts.

Maps use a continuous ramp unless classes or steps is set. classes breaks on round numbers: steps of 1, 2, 2.5 or 5 times a power of ten, on a grid through 0 or through the diverging midpoint. One class holds at most 40 % of the regions when a round step allows it. On a diverging scale with values on both sides of the midpoint, an odd class count mirrors its breaks around the midpoint, for example -10, -5, 5, 10. The center class then holds the midpoint and takes the midpoint gray, and the end classes are open-ended. An even class count keeps a break on the midpoint: a value exactly on it takes the midpoint gray and its own key entry, and the class above it starts with "Over". steps: [15, 25, 35, 45] reuses the cohort chart's four ascending thresholds and defines five classes. A value on a threshold enters the higher class. The first and last classes are open-ended. classes, if also set, must be 5. The format must print the thresholds exactly. A choropleth key prints one range under each class, for example <20, 20–<40 and ≥80. The key has no title unless you set keyTitle.

A choropleth writes each region's code on its shape. A region too small for its code gets the code beside the shape on a short leader. valueTable adds a table of every region with its swatch, code and value; the top regions are bold. 'auto' (default) shows the table for at most 20 regions: beside the map when there is room, else below it when the frame can grow, else not at all. 'side' and 'below' set the place, and false turns the table off. With the table on, the map prints codes only.

A listed region with value: null has a hatch and the key says “Value missing”. An unlisted region draws as pale land without an outline, and the key says “Not in data”. On a choropleth it gets no automatic code; labels: 'all' or labelRegions still names it. This distinction is automatic. A status glyph reserves space before labels are placed. Tile glyphs stay inside one tile. A glyph that cannot fit is omitted with a warning. Labels that move to the tile note also produce a warning.

Fraction values in chart data

Set data.valueKind: "fraction" when all numeric series values are fractions. Set data.series[].valueKind: "fraction" for one series, such as a combo line beside count columns. The engine converts 0.153 to { "pct": 15.3 } once at input. Labels, axes, hover records, accessible text and calculations use percent units. A percent format sets the printed style; it does not multiply values by 100. percent-scale-suspect warns when an undeclared series has values within ±1 and a percent format, percent cells or percent labels on a chart that shows the authored values. Composition charts derive shares from weights and do not need this warning. Grid panels get the same checks as separate charts. Numeric values without a percent claim keep their numeric units. Numeric cells and their ranges convert. Null stays missing. Explicit { "pct": 15.3 } cells already use percent units and do not convert again. Formats, targets and axis bounds still use percent units. A numeric valueLine also uses percent units by default. Set its own valueKind: "fraction" to multiply its value and tolerance by 100. This setting is independent of data.valueKind. A value line within ±1 far below fraction data warns percent-scale-suspect with this fix. "0.0%" and "1.0%" both mean one decimal. This field applies to bar, column, line, combo, dot, butterfly, slope, variance, heatmap, mekko, pie and funnel data. Sparkline uses data.valueKind for its single series. Other data schemas refuse the field. For a combo rate, keep its separate percent axis and the required secondaryAxis.acknowledge setting.

Small values

Without an authored format, boardplot prints every number by one rule. Numbers that a reader compares form a set: the values of a chart, a series with its own unit, a table column, a table row with its own format, a measure of a DimSwitch table, a KPI figure. A sum joins its parts, and an absolute change joins its levels with a sign. A change in percent, a growth rate and a difference in percentage points form a signed change set, and each group of a change set prints two digits of its smallest value: +9.1% · −4.0%, +6.9% p.a., +36%. The statistics of one kind form a set of their own: averages, quartiles, band bounds, the r² values of a chart, and its trend slopes, which take the scale words of the chart's values (+11.7k per period). Each set prints by these steps:

  1. Scale words (k, M, B, T) start at 10,000, in table cells and KPI figures at 100,000. A percent set and a set with a unit text ($m, k visits) print none. A currency sign or code and % are no unit text. A magnitude letter before a currency sign (K$, M$, B€) is a unit text. A German chart has no short word for thousand: with the default marks it prints 7.8 Mio. · 410,000 · 1,251.
  2. Zero prints 0.
  3. The largest value opens a group and prints three digits: 41,230 prints 41.2k, and 413 prints 413. A value of at least a tenth of the largest shares its scale word and decimals. Close values get more digits until they read apart.
  4. No value prints more decimals than the data carry: 62 and 57.5 print 62.0 · 57.5, and 12 prints 12.
  5. A smaller value joins the group when the group shows its two leading digits. Otherwise it opens a later group with two digits of its own: $8.4M · $3.1M · $950k · $410k · $88k · $12k · $900. A nonzero value never prints as 0 and never as a bound.

A table head names a scale word only when every nonzero cell of the column prints it. The ticks of a value axis keep one scale and one decimal count, and take the scale word that fits the largest tick. A value that joins no set when the chart prints it (a reference line) takes the group that shows its leading digits, or prints as a set of one value. No default reads the render target. Computed shares keep their own decimals. options.smallValues rounds a value that needs more than four decimals at the decimals of the set's first group, at most four, and prints its digits where it is nonzero there (0.0003), else a bound ("bound": <0.001) or zero ("zero": 0.000), or prints it in scientific form ("scientific": 1.2 × 10⁻⁶). "p-value" prints every value from 0 to 1 as APA 7 writes a p-value: three decimals without the leading zero (.042) and <.001 below. An authored format prints as authored.

A k, M or B after the digits scales the value: "$1.2M" prints 2,456,000 as $2.5M. A spaced magnitude beside a currency ("$1.2 k") also scales. A scale inside a currency affix ("USDm 1.2", "1.2 €m") holds its divisor. Without a currency, spaced letters remain units: "12 m/s" and "50 B" print the value as it is. The words mn, bn, Mio., Mrd., thousand, million and billion scale with or without a space.

A plain example fixes decimals: "$1.2M" prints 4,270,000 as $4.3M. With no digit, one @ per figure fixes significant figures:

Value"$@@@M""$1.2M"
42,700,000$42.7M$42.7M
4,270,000$4.27M$4.3M
430,000$0.430M$0.4M

Trailing zeros stay. The scale word stays as written for every value: 999,600 prints $1.00M, and 999,960,000 prints $1,000M. Totals, subtotals and calculated rows print in the example too. Where the example prints a nonzero value as its zero (4 under "$1.2M" prints $0.0M), or prints different values of one series, table row or table column as one text, the chart warns format-hides-values. The warning names the format and carries a finer example of the same style that shows every value, checked by drawing the chart with it. Axis ticks and statistics print as before. Ticks keep the example's style and take their digits from their spacing: $10M, not $10.0M. A mean, median, spread, band bound or rate takes up to one decimal more than the example where it needs one: a mean of 16/3 prints 5.333 under "0.00". Write every @ in one run. A split run such as "@@.@%" is refused with the fix "@@@%". More than 15 figures are refused. A digit anywhere makes an ordinary example, where @ stays literal text.

An example with one dot before three digits, such as "1.234", can be a thousands group or three decimals. The chart's numbers decide. Where every number is below 1000 and one has a fraction, it means three decimals: 0.512 prints 0.512. Otherwise it is a group: 1,200 prints 1,200, and where a small number loses its fraction beside large ones, the warning format-reads-as-group names it. "0.000" always means three decimals, and "1,234" always means a group.

Shares that add up

An authored options.format fixes its decimals, including trailing zeroes. A percent example such as 1.0% also sets the decimals of the computed shares on a 100 % bar or column and on a pie. On a pie it formats the slice values only when they are percents (a % unit, percent cells, or values that add to 100). For counts or money it warns percent-format-on-values and the slice values print in the automatic format. Series formats and cell formats override it. A mekko column total prints in the format's decimals, and a nonzero total that prints as 0 warns format-hides-values. Without an authored format, the values print by the default rule. On a percent mekko, a percent example formats shares; absolute column totals keep a number format. Their unit comes from series[].unit when every data series declares the same unit. options.unit names the shares and never labels those absolute totals.

Rounded one by one, the shares of a whole can print a sum such as 100.6 %. options.rounding applies on bar, bartable, column, combo, line, mekko and pie. Every chart defaults to "nearest": each share rounds on its own. A pie warns share-rounding-drift when its printed shares miss 100 %. Set "sum-consistent" for shares that add up to 100 %. Under "sum-consistent" a chart prints every share of a whole at the finest precision one of them needs and moves the fewest shares one step, those that rounding moved furthest, until the printed shares add up to 100 %; no share moves a whole step from its value. The reading lists each moved share under rounding with its value, what it prints on its own and what it prints now. A bar, bartable, column, combo or line chart with a moved share also adds one method note to its notes list, which prints under the chart only where notes.show lists "method". On a column or bar stack with sharesOfOneWhole, the same note says when the authored parts miss 100 and each share is taken of the stack total. The allocation uses the largest-remainder rule. For equal remainders, when the sum must go up, round up the smaller share first; when the sum must go down, take the step from the larger share first. Equal-size ties use the first input index. Use options.format: "1.0%" for one decimal when whole-percent adjustments are too coarse. Other types refuse the option.

Category order and topN

options.sort.categories accepts sheet, reverse, asc and desc. sheet keeps authored order. reverse reverses authored order. asc and desc rank by the chart's measure, with ties in authored order and missing values last.

Dated variance, bullet and butterfly categories keep authored order when a growth or difference annotation spans periods. The chart warns when that replaces the requested order.

options.topN: { n: 2 } keeps the two largest categories by the chart's ranking size before sort.categories orders them.

Dot and variance draw no Others row because scores and ratios are not additive. Kept categories retain authored order unless sort.categories reorders them. A disclosure note and topn-omitted name the kept count, total count and omitted categories. When a cut is needed, authored rest: true, restLabel or showRestCount produces one topn-rest-unsupported warning that names the ignored settings. A request with n at least the category count changes nothing and adds no topN warning. On dot, pareto, variance, pie, mekko and butterfly, threshold is ignored with a warning. A choropleth refuses it.

On bar, column and table, threshold also drops a kept category whose absolute total is below it, also when n keeps every category. The largest category always stays.

Missing stack parts

In a stacked column, bar or combo, null means a value that is unknown. A stack with a null part prints the sum of its known parts as a plain total. The notes list names the missing parts ("Totals add the known parts only: Q1 without B"), and the chart gives one incomplete-composition warning. With notes: { show: ["disclosure"] } the total also prints "(partial)" under its value, and the note prints under the chart. When a component is known to be zero in a category, because it does not apply there, give it 0. Then the total is complete. Keep null for values that are really missing.

SVG size and identifiers

The SVG carries its size as width and height and shrinks to a narrower container. A label halo is a second, stroked copy of the text under it. It works in importers that ignore paint-order, such as LibreOffice.

SVG id attributes and their references use a hash of the drawing, locale and resolved document theme. data-id is a stable part name. It is not a DOM id and does not need page-wide uniqueness. Light and dark renders have distinct ids. Identical charts in one document get a suffix for each copy. Use a distinct host prefix for identical charts rendered in separate calls.

Gantt and grid formats

Gantt and ordinary grid compositions have no numeric value labels of their own. A metric stack panel prints by the default rule: a sum as one set with its parts, a rate as a percent set. A panel that sets divisor or decimals prints as in earlier versions: whole numbers for a sum and one decimal for a rate, or the panel's decimals, without scale words. A chart-level format is accepted, ignored and warns. Set each numeric grid panel's options.format instead. Gantt uses calendar date options.

Metric stack

Use grid with options.stack: {} for two to five measures over the same cohorts or periods. Panels follow the data array from top to bottom. Each panel starts at zero on its own scale. One category axis and an optional period row sit below all panels. See the metric stack section in the grid reference.

Store counts and amounts, such as spend, once in data.measures. Each panel names a sum ({ "sum": ["orders"] }), a numerator and denominator ({ "numerator": ["booked"], "denominator": "qualified" }), or an amount per unit ({ "ratio": ["spend"], "per": "orders" }). An amount per unit divides the sum of the ratio measures by the per measure in each category, with no factor 100. A window divides the sum of ratio over its categories by the sum of per, never the mean of the category values: spend 100 and 300 on 10 and 20 orders is 13.33 per order. readout: "change" compares data.windows.base and compare: the percent change of average counts per category, the percent change of the two window values of an amount per unit, or the percentage-point change of weighted rates. readout: { "base": "measure-id" } gives a weighted mature step rate and the remaining-per-100 chain. A panel that sets neither divisor nor decimals prints its readout by the default number rule, from the unrounded rates: a change prints two digits (−2.7%, +1.4pp), and the step rates and chain ends of all such panels in a stack form one percent set (4.75%, 100 → 4.75). A panel that sets one of them prints a count change as a whole percent (−3%), a rate change as the difference of the unrounded rates, rounded once to the panel decimals, one by default (0.85% → 0.74% reads −0.1pp), and step rates and chain ends at one decimal (4.7%, 100 → 4.7). The engine computes these figures from the same counts as the marks. reading.metricStack.readouts[] gives their inputs and category windows. Each readout has a method and grain. Count changes use average-change; changes of an amount per unit use ratio-change; rate changes use rounded-rate-change; step rates use weighted-rate. Grain is day, week, month, quarter, year or category. It comes from data.windows.grain or the category ids; unrecognized ids use category.

Mark a running category partial: true. Declare unavailable outcome panels in data.states.partial.panels. Declare the maturing range and its affected panels in data.states.maturing. The grid draws one continuous band across those panels. Provisional bars use light fills and dashed outlines. Provisional lines use gray dashes and hollow points. Partial points never connect. Dashes denote projected or provisional data. One panel may set emphasis: true.

The engine owns label space, one panel gap and one shared readout gutter. Use stack.heights for plot heights in layout pixels, or rows for proportional heights. Too-small authored gaps, gutters or heights are refused. A width-only size grows to the content height. On a fixed height shorter than that, default plot heights shrink to their readout floor. Below the floor, the readout puts the unit beside the name and the headline and span on one line, and the panels sit closer together. Slide text can need more height than report text. The example fixtures are metric-stack-volume, metric-stack-steps and metric-stack-per-unit. Existing grids keep their current layout.

options.stack.variant: 'focus' draws the value-first look, with the compare window as the focus. Each panel prints the value of the focus first, then the change and the base value (+86% from $272). type.display.size sets the size of the stack values, for example theme: { preset: 'standard', overrides: { type: { display: { size: 48, lineHeight: 1.08 } } } }. A stacked panel keys each measure with its share of the focus value, in whole percent that add up to 100, under an optional keyTitle such as By plan. With segmentShares: true on that panel, the base and the focus columns also print each segment's share inside the segment, where it fits. The header line names the focus against the base window. The focus categories take the accent, the base window a dark neutral and the rest a light neutral, and a dashed line marks the base value in each plot. Only the focus prints its values, on a plate in the page color. With data.periods the period row is the axis and no category prints its name, so about 30 weekly columns fit beside the readout at 1,184 px. In React, with hover on, the pointer or the keyboard moves the focus to the category under it, and the plots stay in place. The look needs data.windows and readout: "change" in every panel; on a stack of { base } readouts it does nothing and warns option-ignored. The example fixture is metric-stack-focus.

Getting a chart with the CLI

The CLI boardplot has the same verbs and prints the same JSON, one object per command on stdout. - reads the spec from stdin.

boardplot describe waterfall
boardplot render - <<'EOF'
{
  "type": "waterfall",
  "data": {
    "items": [
      { "id": "fy24", "label": "EBIT FY24", "type": "total", "value": 120 },
      { "id": "price", "label": "Price", "value": 18 },
      { "id": "volume", "label": "Volume", "value": 9 },
      { "id": "cost", "label": "Input cost", "value": -14 },
      { "id": "fy25", "label": "EBIT FY25", "type": "total" }
    ]
  },
  "options": { "title": "Price gains outweigh higher input cost", "subtitle": { "measure": "EBIT" }, "unit": "$m" }
}
EOF

The second command prints the same JSON as boardplot_render, here in part:

{ "ok": true, "errors": [], "size": { "width": 720, "height": 454 }, "warnings": [] }

The exit code is 0 when the call succeeded, 1 when the input was rejected and 2 for an internal error. The other commands: boardplot list, boardplot describe waterfall --full, boardplot describe mekko --path valueAxis.break, boardplot describe column --schema options, boardplot render spec.json --rows sales.csv --columns category=month,series=segment,value=revenue (a relative rows path resolves against the working directory), boardplot fixtures --type waterfall, boardplot measure spec.json --width 400, boardplot render spec.json --format png --out ./charts (a PNG goes to a file), boardplot fonts build <font-dir>, boardplot telemetry status, boardplot feedback --category bug --summary "..." and boardplot --version.

A file in --out takes the chart's name, chart when the spec has none; a taken name gets -2, so a render keeps existing files by default, and the warning out-name-taken names the requested and the written path. --overwrite replaces existing output files at the requested paths. The MCP tool uses overwrite: true for the same result. Duplicate chart names within one call still get separate files. --quiet prints only ok and outputs when the render succeeds, which keeps a shell loop over many variants readable; a refused spec still prints its errors. Each warning of severity warn still prints one line on stderr, warning <code>: <message>, before the line that names the written files; with --out - stderr keeps its one JSON object. An --out that cannot be a folder, such as an existing file or a folder without write permission, is refused with out-unwritable and exit 1. A new --out path that ends in another file extension made of letters, such as chart.jpg or chart.pdf, is refused with invalid-argument, because boardplot writes SVG and PNG only; end the path with / to make a folder of that name. --out - writes the one chart to stdout, the SVG text or the PNG bytes, and prints the JSON answer on stderr: boardplot render spec.json --out - > chart.svg.

Several charts in one call

A document draws several charts in one call: { "version": 1, "charts": [...] }, with a unique name per chart that also names its file under --out. A root theme or locale applies to every chart that sets none. The CLI starts and loads the engine once for all charts, where one boardplot render per chart pays that start for every chart. boardplot_render, boardplot_measure and boardplot measure take a document too.

boardplot render - --out charts <<'EOF'
{
  "version": 1,
  "charts": [
    {
      "name": "revenue",
      "type": "column",
      "data": { "categories": ["2024", "2025"], "series": [{ "id": "revenue", "label": "Revenue", "values": [120, 135] }] },
      "options": { "title": "Revenue grew 12.5 percent", "subtitle": { "measure": "Revenue" }, "unit": "$m" }
    },
    {
      "name": "margin",
      "type": "line",
      "data": { "categories": ["2024", "2025"], "series": [{ "id": "margin", "label": "Margin", "values": [18, 21] }] },
      "options": { "title": "Margin rose three points", "subtitle": { "measure": "EBIT margin" }, "unit": "%" }
    }
  ]
}
EOF

This writes charts/revenue.svg and charts/margin.svg. The answer lists each chart under charts with its name, and outputs lists the files. The document is checked as a whole: one refused chart refuses the call and no file is written. Each error names its chart (chart 'margin': …) and points into it (/charts/1/options/…), so fix or drop that chart and render again. --out - takes a document of one chart only.

Problem reports and usage counts

When boardplot itself fails, refuses wrongly or draws something misleading, offer the user a problem report: boardplot_feedback, or boardplot feedback on the CLI. Write the summary without client names, numbers, labels or paths, show the user the report, and let the user submit issueUrl on GitHub. Send nothing without the user's yes to that exact text. Usage counts are off until the user runs boardplot telemetry on; never run it for the user unasked. Telemetry and feedback lists every field.

Getting a chart in React

BoardplotChart takes the same spec.

import { BoardplotChart } from 'boardplot/react/spec';

const spec = {
  name: 'revenue-mix',
  type: 'column',
  data: { categories: ['2021', '2022', '2023', '2024', '2025'], series: [{ id: 'subscriptions', label: 'Subscriptions', values: [62, 74, 88, 103, 121] }, { id: 'services', label: 'Services', values: [38, 41, 43, 44, 46] }] },
  annotations: [{ kind: 'cagr' }],
  options: { variant: 'stacked', title: 'Subscriptions carry the growth', subtitle: { measure: 'Revenue by line' }, unit: '$m' },
};

export function RevenueMix() {
  return <BoardplotChart spec={spec} size="container" fit="fill" fallbackSize={{ width: 960, height: 540 }} />;
}

The entry stays small because it links no chart engine and no chart schema. BoardplotChart reads the type a spec names and fetches three chunks. Spec validation — the document parser, the diagnostics and zod — serves every type, so a page loads it once. The type's data and options schemas are their own chunk, and its engine a third. A grid's engine links no panel engine: it fetches the engines its panels name, all at once. The repository's package check (npm run smoke:package) prints the current sizes of the entry and of the first chart of each type. Until the chunks arrive it draws the busy placeholder, the box a refused chart uses with the wording of strings.loading; in the browser an engine the page already holds needs no second wait. A server pass always draws the placeholder, whatever that server loaded for an earlier request, so its output stays the same as it warms up and hydration matches it; prepared is no exception, because a prepared chart's request is resolved against the type's registration before its scene is attached. Put a chart in the server HTML with the type's own component, such as ColumnChart from boardplot/react/column. A chunk that does not arrive leaves the diagnostic card in the chart's place and the next render asks for it again.

BoardplotTheme sets the theme, locale and built-in wording for every chart below it. The language sets words only: locale="de-DE" prints 1,234.5, and locale={{ language: 'de-DE', decimal: ',', thousands: '.' }} prints 1.234,5. For server rendering, prepareChart lays the chart out once on the server; pass its result as prepared with the same props, and the first client render reuses it. prepareChart and parseChartSpec return promises, because they load only the types the spec names.

import { BoardplotTheme } from 'boardplot/react/theme';
import { BoardplotChart } from 'boardplot/react/spec';
import { parseChartSpec, prepareChart } from 'boardplot/react/prepare';

const spec = { type: 'bar', data: { categories: ['North', 'South'], series: [{ id: 'orders', label: 'Orders', values: [42, 35] }] } };
const sizing = { size: 'container' as const, fit: 'content' as const, fallbackSize: { width: 800, height: 450 } };

export async function Orders() {
  const prepared = await prepareChart({ ...(await parseChartSpec(spec)).request, ...sizing }, { theme: 'notation' });
  return (
    <BoardplotTheme theme="notation">
      <BoardplotChart spec={spec} {...sizing} prepared={prepared} />
    </BoardplotTheme>
  );
}

A host that draws its own card around a chart switches boardplot's frame text off: title: false, legend: 'none', footnotes: false, and no subtitle or source. footnotes: false also leaves off the method notes boardplot derives, and the info lint footnotes-off names each one so the card can print it; the render's notes list holds them all. A disclosure that notes.show prints stays: a table's rounding note, a partial period, values the chart does not print. The source line and a required map credit stay: leave source out for no source line, and a map license credit cannot be switched off. legend: 'none' leaves off the key of a table, heatmap, cohort or variance, and the scatter size key, and the info lint legend-off names that key and its entries so the card can draw its own.

An invalid spec renders an error card with the same errors the CLI returns. Each type also has its own component with flat props, such as WaterfallChart from boardplot/react/waterfall, which takes data, annotations and the options as props (title, unit, valueAxis). Such a component refuses a prop its type does not take with the same unknown-option card. It checks the keys and leaves the option values and a grid's panel options to the spec path. Props, container sizing, server preparation and export to SVG, PNG and CSV are in the React reference. For a PDF, print the page from the browser or place an exported SVG in a document tool.

Per-type components take className and style on one wrapper, and a number for size or fallbackSize as the width in pixels. SVG components also take background="transparent" to leave out the canvas rectangle. Halos and hollow marks keep the theme background color. An invalid size or theme draws the refusal card during server rendering too.

A dimswitch row id is JSON.stringify([variant, memberId, measureId]); a member row in by-member omits measureId. React onRowSelect and isRowSelectable get these ids, and dimswitchRowId(variant, memberId, measureId) builds them (exported from boardplot).

A per-type entry is the small one: it links its own chart and the shared layout core. A page pays for the core once, and each further type adds only its own engine. Two core modules are not in that load, because most charts never reach them. The annotation placement engine, with the event lane, loads when a chart carries an annotation (an event included), a value line, a target or a derived callout. The checks a PATCHED theme goes through load when a caller passes theme={{ preset, overrides }}. Pareto and likert are the two types that need one on every chart — the cumulative threshold line and the statement-label theme patch — so their entries link it rather than fetch it. While such a chunk loads the component draws the busy placeholder and then the chart, byte for byte the chart it drew before; a graph that already links the module — the CLI, the MCP server, boardplot/react/prepare, the boardplot/react barrel — never waits in the browser. A server pass, and the client pass that hydrates it, count only what the chart's own entry links, because a server process can hold a module that the page in the browser does not: renderToStaticMarkup of an annotated chart or a patched theme from a per-type entry (boardplot/react/<type>) writes the placeholder unless the component gets prepared, and the chart follows once the page has hydrated. The barrel's components draw it, because the barrel links both modules.

When a refused or empty chart's card has not loaded, renderToString writes the loading fallback. Hydration then reports React error 419 in production before the client draws the card. Use renderToPipeableStream to wait for the card on the server.

Rows in React

Every chart component takes query rows in place of data, with the same columns and the same refusals as rows in boardplot_render. data is then the template: a series it already names keeps its label and color role. A SQL date column can be the category and the date at once, columns: { category: 'month', date: 'month', series: 'product', value: 'revenue' }; the months then print as 'Jan', 'Feb' and so on.

import { LineChart } from 'boardplot/react/line';

const rows = [
  { week: '2026-W40', channel: 'Search', revenue: 120 },
  { week: '2026-W40', channel: 'Social', revenue: 80 },
  { week: '2026-W41', channel: 'Search', revenue: 135 },
  { week: '2026-W41', channel: 'Social', revenue: 95 },
];
const columns = { category: 'week', series: 'channel', value: 'revenue' } as const;

export function WeeklyRevenue() {
  return <LineChart rows={rows} columns={columns} title="Search leads every week" unit="$k" size="container" fit="fill" fallbackSize={{ width: 960, height: 540 }} />;
}

onRowsReading receives the reading: the row count, the columns no role names and the cells a state column marked. A map and a heatmap draw such a cell hatched and name its state in the key; the other charts draw it as an empty one, so only the reading tells them apart. Rows that do not map draw the error card with the CLI's code and the row, such as invalid-value at rows.3.revenue. BoardplotChart takes rows and columns too, beside a bare chart spec. The mapping loads as its own chunk the first time a chart gets rows, so a page without rows does not pay for it; prepareChart takes the same rows for a server render. Rows from a query has the details.

specFromRows from boardplot/rows runs the same mapping as a function, in the browser or in Node, and returns { spec, reading }: use it to build a spec yourself, for example in a server component. Rows that do not map throw an InputError with the CLI's code, message and details.path, such as /rows/3/revenue. The entry links no chart engine and no zod. It reads no file: rowsFile is for the CLI and the MCP server. Region ids match without regard to case. The adapter checks duplicate choropleth regions when the page has imported the map pack (boardplot/geo/<id>); the chart leaves out unknown region ids with a warning and a note. A tilemap checks its region ids when it draws. specFromRows is also exported from boardplot.

Small bundles

With esbuild 0.28.2, code splitting, minification and React external, a column's first load through boardplot/react/spec is about 354 kB gzip. The initial entry is about 194 kB; validation adds about 86 kB, of which about 32 kB is zod, then the column schema and engine load. The validation chunk is shared across chart types. Importing ColumnChart from boardplot/react/column starts at about 237 kB gzip and links no zod. These sizes assume code splitting, the default in the production builds of Vite, webpack and Next.js; a bundle without splitting inlines the chunks a chart loads on demand and is about 57 to 87 kB larger per chart type. These are package measurements with gzip level 9; the host build can produce different chunk sizes.

boardplot/react registers every chart core when it loads, so a page that imports it links the whole catalog, whatever it draws. For a small page, import each chart from its own entry, or draw through BoardplotChart from boardplot/react/spec. Take the theme provider and the other shared pieces from boardplot/react/theme: BoardplotTheme, useBoardplotTheme, ScaleGroup, useScaleGroupPlan and SceneRenderer. That entry registers no chart core, so the page links only the cores it draws. Bundle with code splitting, as the production builds of Vite, webpack and Next.js do. A per-type entry loads the annotation engine, the checks a patched theme goes through and the hover and data-table records on demand; a single-file bundle inlines them into the page for every chart type, and BoardplotChart then inlines every engine. useChartLayout lays out any type by name and registers every core; it stays in boardplot/react.

import { BoardplotTheme } from 'boardplot/react/theme';
import { ColumnChart } from 'boardplot/react/column';

const data = {
  categories: ['2021', '2022', '2023', '2024', '2025'].map((year) => ({ id: year, label: year })),
  series: [
    { id: 'subscriptions', label: 'Subscriptions', values: [62, 74, 88, 103, 121] },
    { id: 'services', label: 'Services', values: [38, 41, 43, 44, 46] },
  ],
};

export function RevenueMix() {
  return (
    <BoardplotTheme theme="notation">
      <ColumnChart data={data} variant="stacked" annotations={[{ kind: 'cagr' }]} title="Subscriptions carry the growth" unit="$m" size="container" fit="content" fallbackSize={{ width: 800, height: 450 }} />
    </BoardplotTheme>
  );
}

Export fonts

The React SVG export copies the page's web fonts that its text draws with into the SVG, as @font-face rules with data: URLs. It copies only the families, weights, styles and unicode-range slices that the text uses, each as the whole font file the page loaded. A file opened in a browser on another machine then draws the same face with the measured spacing. A family the machine lacks is skipped. An installed system family ends the stack for text in Latin-1 and general punctuation, which every system font draws, so the export copies no later web font for it; text with other characters keeps the later web fonts, which draw the glyphs the system family lacks. The built-in presets name system fonts only, so their exports add no bytes. A web font adds its file size plus a third for the base64 encoding: the variable Geist Latin file (29.4 kB, every weight) adds 39.3 kB to each SVG. Pass embedFonts: false for the plain SVG, for example when the page that shows it already loads the font, or when the font license forbids copies in documents. Design and slide tools that import SVG can ignore embedded fonts; use the PNG there when the font is not installed.

Before export, the React export checks document.fonts.check() for the theme font stack. If the check fails, it warns once per page and font stack through console.warn, the existing export warning channel, and the file carries no copy of that font. Load the font before export. The check does not prove that an undeclared font is installed; see the CSS Font Loading specification. The PNG export paints the SVG with the same font copies, also with embedFonts: false. If a loaded font file cannot be read (a style sheet from another origin, a FontFace built in script, a failed fetch), the export warns and the text draws a fallback font.

The CLI and MCP SVG names the theme font stack and embeds no font; their PNG draws with the fonts installed on the machine. For a brand web font, either export from React, or install the font on the machine that renders and pass --font-tables from boardplot fonts build (Custom fonts), then hand on the PNG.

Story steps

Wrap a chart with withStory from boardplot/react/story to show options.story.steps with Back and Next controls. Each step uses the authored title and optional body. The marks stay in place. Back stops at the first step. Next stops at the last step.

The panel stays outside the plot. Wide charts reserve a 240–320 px right column. The S width class, or a chart that cannot give up that width, puts the panel below the x axis at the full plot width. Automatic height grows for the panel. Fixed height reduces the plot toward its measured minimum. If the panel still does not fit, its body loses lines first, down to zero. Then its title clamps to one line. The button row stays. The chart refuses only when this minimum panel and the plot cannot fit. The panel uses the background and grid tokens with a 6 px radius. Next uses ink with background text. Back has a hairline outline. Hover paint runs only on devices that support hover; pressed paint uses theme tokens.

Use Tab to focus the story or either button. Left and Right move between steps. The story declares these keys with aria-keyshortcuts. The story and buttons have a 2 px focus ring with a 2 px offset, in the theme's ink color. Each HTML button has a minimum 44 × 44 CSS px hit box. Back grows left and Next grows right, so the hit boxes keep their gap when the SVG shrinks. The drawn buttons are at least 44 px high. Their labels wrap when needed. The counter sits on the left. Back and Next sit on the right with an 8 px gap. If the row is too narrow, the counter moves above the buttons.

The polite live region announces Step N of M: title. body. Set strings.storyStep to author the position wording. It accepts {step} and {count} without zero padding. Defaults are Step {step} of {count} in English and Schritt {step} von {count} in German. A chart string overrides the React theme provider string. The drawn counter uses strings.storyCounter, with the default {step} / {count} and no zero padding. There is no progress bar. A single step shows only the title and body, without buttons or a counter.

The panel shows up to four title lines and ten body lines. A cut title or body reports story-text-truncated with the step id and field path. Shorten that field or give the panel more width. The live region retains the full authored title and body.

Notes under the chart

**bold** in the title, subtitle (company, measure and period), notes and source draws bold and wraps at the bold weight. A single * stays literal.

options.footnotes accepts one string as a one-item array. options.source accepts an array of strings, joined with ; into one source line. An empty array prints no source. Set options.strings.source: "" to print the credit without a prefix or colon.

Boardplot sorts every note under a chart by kind. In the live React chart, the render target decides how much of it the frame prints. A React chart with fit="content" takes its height from its content and prints the footer of the static image: every note of the kinds notes.show lists, in full, with no line budget, so it is as tall as boardplot render at the same width. Under notes.placement: 'info' a "Notes and sources (N)" button opens the notes the image does not print; it sits in the space the image leaves free for it.

Boardplot prints none of its own notes under a chart by default, on every target and surface: the method and disclosure notes go to the notes list only. notes.show prints them where the author asks for them. A spec that asks for notes another way gets them too: methodNote: true or an authored notes.placement prints the method notes and disclosures within the line budget, after the author notes. What does not fit goes to the notes list, and the pointer counts it. A changed note wording alone (strings.incompleteStacks) prints nothing. Static SVG, PNG and clipboard images print the full author notes, the kinds notes.show adds, the source and the credit. Compact charts retain note reference numbers. Grid panels move notes that do not fit into the outer footer, under the panel title and ID. They have no notes button or "+N notes" pointer. The notes start at the normal footer gap below the chart's last element. They use the existing footer space first. If they need more room, the canvas grows below its original boundary. The plot keeps its position and size. footnotes: false still suppresses notes other than the disclosures notes.show prints.

KindWhat it isWhere it goes
noteYour footnotes, in your orderThe frame, within the line budget
methodBoardplot's text on how a number is built (likert net, the pvm split)The notes list; notes.show: ['note', 'method'] prints its one-line short form
disclosureBoardplot's text on how to read the chart: a key to an encoding ("One cell = 5%", "W38 partial", "Columns by rank"), a change to the data ("1 value below zero shown as 0."), or the marks the drawing leaves unlabeled ("Not labeled on the chart: ...")The notes list and its warnings (values-in-note, labels-as-ranks); notes.show with 'disclosure' prints it in the frame, outside the line budget; methodNote: true or a notes.placement prints it within the budget
sourceYour sourceAlways in the frame, last line
creditA map pack's license creditUnder the source line when the license requires it (de-states, us-states), else the notes list

The line budget counts the notes and the source line. Outside it print only a required credit, an author note a mark points at, a disclosure a drawn mark points at (the rank key under ranked columns, a numbered note on a cut name), and a disclosure where the author lists 'disclosure' in notes.show. A numbered author note that a mark on the chart points at ("1)" beside a category) prints on every target, like a required credit. A mark that points at one of boardplot's own notes prints only where that note prints: without 'disclosure' in notes.show, a column row draws no rank numbers and no note mark on a cut name, a gantt milestone keeps its diamond without a key number, a table head drops its † and a dimswitch period its *. footnotes: false keeps a disclosure that notes.show prints; it leaves a pointed note off with the other notes and hands it to the host in the footnotes-off lint. Report and dashboard take 3 lines (2 under 720 px wide), slide 2 and print 3. A note that does not fit moves to the notes list with every note after it, and the source line ends with "+N notes". The pointer counts only the hidden notes of the kinds notes.show prints. A slide prints only the source line, the credit and the pointer by default (notes.placement: 'list'); set notes.placement: 'frame' for its 2 lines of notes.

Every render returns the notes list, so a host can build an appendix or a backup slide from it: notes on each chart of the CLI and MCP result, notes in the reading, and geometry.frame.noteList in the library. Each entry is { n, kind, text, short, inFrame }; a credit adds links, and a note the chart numbers adds ref, the number it prints with.

For example, in a live React layout, a likert chart's net note reads { "n": 3, "kind": "method", "text": "Net = share on the agree side minus share on the disagree side, in percentage points; the neutral option counts on neither side.", "short": "Net = agree minus disagree, in points.", "inFrame": false }. Static output prints the full text and sets inFrame to true where notes.show lists 'method'.

The options:

The de-states pack prints "Map: © BKG (2026) dl-de/by-2-0 (data changed), Datenquellen: <URL>" in SVG, PNG and PDF at every width, and under footnotes: false. React shows the full credit at every width and in print. The credit wraps as needed, with "BKG", "dl-de/by-2-0" and "Datenquellen" as links. The us-states pack prints "Map: U.S. Census Bureau (2025)". The Natural Earth packs (eu27, europe, world, dach) need no visible credit; theirs is in the notes list. NOTICE.md has the full license texts.

In React the footer is HTML under the SVG. onNotes(notes) hands a host the list whenever it changes, and renderNotes(notes) draws the notes in place of the button and panel; the source line and a required credit stay under the chart. The panel opens by click or Enter, closes with Esc, and print CSS opens it.

A host's own document capture Escape handler runs before the browser closes the popover; the host should ignore Escape while it contains [popover]:popover-open.

Sizing

Pick the target, give the slot size. The target names the medium the chart is read in. It sets the type sizes, the readability floors and the default canvas. The slot is the space the host gives the chart. Boardplot lays the chart out at that size, so its text keeps the size the target sets.

MediumTargetSlot sizeCLI flags
HTML report, Claude Artifact, emailreport, the defaultColumn width in px, for example 680 to 720--width 700
Dashboard carddashboardThe card. In React, size="container" measures it--target dashboard --width 480
Slide pictureslidePicture box in ptboardplot render spec.json --target slide --width 660pt --height 360pt; a PNG at the default --scale 2
Print or PDFprintPrint area in mm--target print --width 180mm --height 110mm --scale 3.125 (300 dpi)

Set the target with --target on boardplot render and boardplot measure, with target on boardplot_render and boardplot_measure, with options.target in the spec, or with the target prop in React. BoardplotTheme passes its target to the charts below it. A target given to the call wins over options.target, which wins over the provider. Without one, the target is report.

options.textScale multiplies every text the chart draws: title, subtitle, labels, axes, legends, notes, source, event lanes, KPI figures and eyebrows, and the table faces, the theme's absolute table sizes included. It takes 0.5 to 2.5; 1, like no value, keeps the target sizes, and 1.25 sets every text 25 % larger. The layout runs again at the new sizes, so lines wrap, labels move and ticks thin as they need to; the canvas keeps the size you give. A theme override of one role still works, and textScale multiplies it too. A scale under 1 stops each text at the target's readability floor (11 px for most report text), so it never draws text under it; a scale above 1 raises the floors with the text. In React, BoardplotTheme passes its textScale to the charts below it, the table grid and the hover cards included, and a chart's own textScale wins. geometry.presentation.textScale carries the scale the chart drew at (absent at 1), for HTML that a host prints beside the chart. textScale multiplies the size of the chart's width class, so charts of different widths draw different sizes at the same scale: at 1.4 a 1010 px chart sets its labels at 18.2 px and a 560 px chart at 15.4 px. For equal text, use textSize.

A theme override of type.secondary.size sets the key text size. An override of type.footnote.size sets the note and source text size. These sizes take priority over the frame defaults.

Equal text across charts on one page or slide. options.textSize pins the primary label size in px, the same at every width, from 6 to 32. Every other text role keeps its ratio to the primary label in the middle width class (720 to 1079 px): on the report target, textSize: 13 draws a 560 px chart with the sizes a 1010 px chart has. A chart of 1080 px or more draws smaller than its default under textSize: 13, because its default class is larger. On slide and print, textSize is in layout px, not pt. Set the same textSize on every chart of the page or slide, on BoardplotTheme for all charts below it, or once on a grid, where it applies to every panel; a panel that sets another value is refused. It works on every chart type, in boardplot render, boardplot measure, the MCP tools, the API and React. textSize and textScale together are refused: keep one. The floors stay: a textSize under the target's sizes stops each text at its floor.

--width and --height take a number of px, or a number with px, pt or mm. The MCP width and height are px; put a physical size in options.size with its unit. 1 pt is 96/72 px and 1 mm is 96/25.4 px. A width alone leaves the height automatic. Without a size, kpi, bullet and sparkline keep their card size on slide and print, and a framed sparkline (title, subtitle, source or note) is as wide as its title and at least 320 px (never wider than the target's canvas). Over a pinned height, a width alone keeps that height; over a size preset, it keeps the preset's shape (slide-4x3 at --width 840 draws 840 × 632 px, the same ladder step).

{
  "type": "column",
  "data": {
    "categories": ["2024", "2025"],
    "series": [{ "id": "revenue", "label": "Revenue", "values": [120, 135] }]
  },
  "options": { "title": "Revenue grew 12.5 percent", "unit": "$m", "target": "slide", "size": { "width": 660, "height": 360, "unit": "pt" } }
}

The answer gives the size in layout px: 660 × 360 pt is 880 × 480 px.

{ "ok": true, "size": { "width": 880, "height": 480 } }

The layout width selects a class: S below 720 px, M from 720 px, L from 1080 px. In the M class, title, label, axis and footnote are 20, 13, 13 and 12 px for report; 18, 13, 13 and 12 px for dashboard; 20, 14, 14 and 10 pt for slide; and 16, 11, 11 and 9 pt for print. KPI and bullet use the M sizes at every width. To fit, the engine wraps, moves or discloses labels; it never sets text below the target's floor. A slide or print canvas that is too small for these sizes is laid out once more with the label at its floor (12 pt on a slide, 9 pt in print) and every other text scaled by the same factor down to its own floor. A chart that then draws carries the info lint type-stepped, which names the size that draws the full sizes. An authored textScale, textSize or belowMinimum: 'refuse' skips this step. A chart that still does not fit is refused with the size it needs. A theme that sets a smaller size renders with one warning.

Without a size, report starts at 720 × 405 px and dashboard at 480 × 270 px; both take the height their content needs. An automatic table or DimSwitch card under 480 px wide takes the content height at its own width, so it can be shorter than a wider card. slide is fixed at 888 × 396 pt (1184 × 528 px), the content frame of a 960 × 540 pt slide. print is fixed at 267 × 180 mm, landscape A4 inside 15 mm margins. The presets slide-16x9 (720 × 405 px), slide-4x3 (720 × 540 px), a4 (1052 × 744 px) and dashboard (480 × 270 px) keep their sizes. a4-landscape-content (267 × 180 mm) and a4-portrait-content (180 × 267 mm) are new. A preset sets the size, not the target: use target: "print" with the A4 content presets. A full slide is size: { "width": 960, "height": 540, "unit": "pt" } with target: "slide".

The SVG viewBox is in layout px. Its width and height are px for report and dashboard, and pt for slide and print, so the host places it at the slot size. A PNG has scale pixels per layout px, 2 by default for every target, and records 96 × scale dpi. Raster density does not change the text size or the placed size: a 660 × 360 pt chart at --scale 4 is still 660 × 360 pt with 14 pt labels. Printing a report chart does not give it print type; render it again with target: "print".

The SVG shrinks to a narrower container, and its text shrinks with it. An SVG may shrink by about 10 % at most before it warns, and a floor can allow less. embed.width declares the CSS px width the host shows the chart at; the render warns type-below-effective-min when that width is below the safe minimum. Do not change embed.width to remove the warning; render at the slot width instead. In code, geometry.presentation holds the target, the class, the natural size and minDisplayWidth, the narrowest CSS px width that shows the chart without a warning. A static SVG cannot know the width it gets.

A chart in a narrow phone layout needs a new layout, not shrinking. Render it again at the phone width, where many types draw in compact mode; use a simpler chart; or keep a readable minimum width with horizontal scrolling or a full-size view.

Each type has a floor, minWidth × minHeight in layout px, and a fit, listed by boardplot_list and boardplot_describe. A fill type uses the whole frame. A content type such as bar, table or kpi takes the height its rows need. A size refusal for a width alone names the width from which the request draws under its own belowMinimum setting: the compact chart's where it falls back to compact. Render, measure, canDraw and React name the same width.

The width floor of a row chart (bar, bartable, funnel, butterfly, likert, gantt, cohort, heatmap) and of a band chart (waterfall, pareto, variance, pyramid, box, mekko, pvm) is the width its content measures, and never less than the card minimum of 280 px. The chart draws full where its content fits. Below that it draws compact, and it is refused only when compact does not fit either; the refusal names the size compact needs. This also holds for a width alone. Every row and band type has a compact form, except mekko, whose mode names its calculation, and bullet, which compacts only by density: 'compact'. A status grid and a horizontal waterfall have no compact form. They draw full down to the 280 px card minimum, the status grid with its column heads wrapped and the waterfall with its step values thinned. A bullet chart's width floor is the width its rows measure. A bullet row keeps its natural pitch of 44 px (more when target values print above their ticks) in a frame taller than the rows need, and the extra height stays empty below the chart. A diagram draws on a card down to 280 px when no card or group text is cut and no group frame overlaps another there; otherwise it keeps a 480 px floor. A node, group, caption, badge or edge label that the narrow card would hide, or an edge label it would cut, also keeps the 480 px floor. Column, line, combo, histogram, scatter and dot keep a 480 px floor and draw below minWidth or minHeight, on either axis, down to a compactFloor. A KPI card, a pie, a choropleth and a column also draw narrower than 280 px, down to 120 px (160 px for a map) and below their compactFloor, while their content fits: the KPI's figure, the pie's circle and labels, the map's key and small members, and the column's bars, each at least 3 px wide. Otherwise the refusal names the width the content needs. A pie keeps its 320 px height floor for an automatic height; a pinned pie draws compact below it, down to 160 px, while its circle keeps a radius of at least 36 px. A pinned slope draws compact under its 270 px height floor, down to 180 px, while its plot keeps 80 px; with an automatic height it takes its content height. An authored grid of several columns that refuses under 480 px draws compact: its panels stack in one column, in authored order, down to the width its widest panel measures. Metric stacks, category tiers, legacy facet grids and grids with anchors or alignmentRules have no compact form.

Compact mode sets minimal labels, tight spacing and the key in the footnote size. It keeps the series key, the whole title and the subtitle; a canvas too short for them is refused with the height they need. A fill chart in compact mode keeps a plot of at least 80 px, whichever side of the canvas is short. On a fixed width and height a canvas that cannot hold it draws the plot under that floor, down to the type's hard minimum (step 7 under "Fixed height"), and warns plot-under-floor with the height it needs. belowMinimum: 'refuse' refuses below the measured floor instead of drawing compact. A type without a compact floor refuses below its minimum. Every refusal names the minimum it needs.

Frame text, key and automatic height

These rules apply on every target.

Fixed height

A slot with a fixed height (options.size.height, a size preset, or a host height in React) never grows. When the content does not fit, the chart gives up optional parts in this order:

On a fixed compact card, the plot first tries its hard minimum with the source line and subtitle still on the canvas. A rectangle treemap also gives up its 160 px plot floor before it refuses the card. Text keeps its size floor. belowMinimum: 'refuse' keeps the full floor.

  1. Value labels thin to the few the compact mode keeps.
  2. Axis ticks thin with the plot height.
  3. Notes move to the notes list; the source line ends with "+N notes". A compact frame then puts the source on one line, and as the last footer step moves it to frame.source for the host (the info lint footnotes-off names it).
  4. The key takes the footnote size, so more entries fit in one row.
  5. The plot shrinks to its floor.
  6. The subtitle moves into the notes list (warning subtitle-moved-to-notes). It stays readable there and in the React notes panel. The source line stays with the host, as step 3 left it. A unit line ("Revenue in $m" without the measure) can stay on the canvas.
  7. The plot goes under its floor, down to the type's hard minimum: a bar's rows get thinner than its segment labels need, and labels that do not fit are hidden. A column, line, combo, histogram, scatter or band chart keeps a plot of at least 40 px with room for two value-label rows, which holds two labeled value ticks; its other measured needs (end labels, rows) still apply. A value label that loses its seat goes to the note, as the note rules say.

The title is never cut and the key is never dropped. When the plot ends under its floor (160 px, dashboard 140 px), or a row type draws at its hard minimum, the chart is still drawn and warns plot-under-floor. The message gives an estimated height from the drawn frame, and the warning carries no fix. Use measure for the exact verified size. Only when step 7 still misses is the chart refused with the size it needs (size-below-floor). Steps 6 and 7 apply on a fixed width and height in compact mode. At step 7 a heatmap row drops its 28 px comfort height to its text line and 2 px, and a dot row keeps 1 px of air instead of 4.

In React the HTML footer takes exactly the height the layout reserved for the footer it replaces, and the notes panel opens over the chart, so a chart in a fixed-height slot never grows past it. A React container without a host height hands the engine its width alone, so it takes the same automatic height and plot floor as the CLI.

A size up to 0.5 px under a minimum still fits, for every type. A browser lays a card out in fractions of a pixel, and 777.98 px for a 778 px minimum draws. A refusal prints whole pixels.

boardplot_measure reports the size a spec needs without drawing it:

{
  "name": "boardplot_measure",
  "arguments": {
    "width": 400,
    "spec": {
      "type": "waterfall",
      "data": { "items": [{ "id": "fy24", "type": "total", "value": 120 }, { "id": "price", "value": 18 }, { "id": "fy25", "type": "total" }] }
    }
  }
}
{
  "minWidth": 280,
  "minHeight": 270,
  "naturalWidth": 280,
  "naturalHeight": 334,
  "fit": "fill",
  "compactFloor": { "width": 280, "height": 180 },
  "mode": "full",
  "refused": null
}

For a width alone, minWidth is the narrowest width from which every wider width draws in full mode, and compactFloor.width the narrowest from which every wider width draws at all. A form that refuses only in a narrow band between two widths that draw can stay unseen.

measure reports two minimum heights. The minimum height depends on the width: text wraps, and notes grow with the frame. So minHeightAtWidth is the height needed at exactly the width you asked for (the minimum width when you asked for less): a chart pinned at that width and that height draws in full mode. minHeight is checked at the minimum width as well, so a chart pinned at minWidth × minHeight draws too. In a wide slot minHeight can be taller than the slot needs, because the narrow case sets it. A 280-day combo at 1168 px wide reports minHeight 522, minHeightAtWidth 404 and naturalHeight 657. Do not read the minimum from a layout that was drawn taller (geometry.sizing): it holds for that frame only. canDraw answers a size refusal with the same at-width height when the request has a width.

Which value to use for a card:

ValueMeaningUse it for
minHeightAtWidthThe height that draws in full at the width you asked for: every hidden value is named in the note. A pinned height a little below it can still draw, with a note that counts the hidden values instead of naming them; canDraw tells you. Lower still, the chart is refused, or drawn compact when the type has a compactFloor.The floor of a dashboard card.
minHeightA height that draws at this width and at minWidth.A floor that must also hold when the card gets narrower.
naturalHeightThe height the chart wants at this width: its aspect height for a fill chart, the height of its content for a content chart. It is at least minHeight on most charts. A narrow table or DimSwitch can report less, because the minimum width sets minHeight.The target height for a dense chart: many categories, a long footer, an event lane.
comfortableHeight1.25 × minHeight.Spare room for longer labels.

size.height is the height the chart draws at the width you asked for. A spec that pins a height taller than its chart needs (a circle treemap is bound by its width; a bullet panel or a Gantt chart stops at its row height) leaves the rest of the frame empty on render. measure does not report that empty part: size.height is the least height whose drawing has the same marks and words, and naturalSize.height follows it. A chart that grows with the frame, or a spec with no pinned height, keeps its height. Size a host frame from size.height and the pinned spec will not leave empty bands.

A dense chart grows with its data. Do not give it a fixed small height such as 300 px. Measure at the width of the card slot, use minHeightAtWidth as the floor and naturalHeight as the target. If the slot cannot be that tall, show a chart with fewer categories or events, or let the card scroll. Do not shrink the chart.

Below the floor a render is refused. It draws nothing and returns one error that names the pixels it needs, with a fix that sets them.

boardplot render - --width 240 <<'EOF'
{ "type": "waterfall", "data": { "items": [{ "id": "fy24", "type": "total", "value": 120 }, { "id": "price", "value": 18 }, { "id": "fy25", "type": "total" }] } }
EOF
{
  "ok": false,
  "errors": [{
    "code": "size-below-floor",
    "path": "/width",
    "suggest": "Pass width 280.",
    "fix": [{ "op": "replace", "path": "/width", "value": 280 }]
  }]
}

Rendering at 280 pixels or more draws the chart. In React, size="container" lays the chart out at the size of its parent element, fallbackSize sets the frame for the server output and the first render, and a chart that does not fit its parent shows a placeholder until the parent is wide enough. The measured size is the layout size; boardplot does not read the host's font size. A fixed-size chart does not grow past its natural width, and onWarnings reports a display narrower than its safe minimum.

Type sizes and floors

The target and the width class set the default type sizes. report and dashboard sizes are layout px; slide and print sizes are pt. Sources use the footnote size. Secondary text (ticks, axis titles, background series labels) uses the secondary size. The font family, weights and line heights come from the theme.

TargetUnitClassTitleSubtitleLabelAxisSecondaryFootnote/sourceMicro
dashboardpxS16131313131211
dashboardpxM18131313131211
dashboardpxL20141414141211
reportpxS17131212111212
reportpxM20141313121212
reportpxL22151515131313
slideptS18131313131011
slideptM20141414141011
slideptL22141414141111
printptS141010101099
printptM161111111199
printptL181111111199

The engine never fits text below the floor of its target. The floors apply to the size the reader sees, after display scaling.

TargetUnitTitleSubtitleLabelAxisSecondaryFootnote/sourceMicro
dashboardpx14121212121111
reportpx17111111111111
slidept16121212128.2511
printpt121099988

Table values and data-bearing chips use the label floor. Table headers use the axis floor. Notes and sources use the footnote floor. Ordinary values never drop to the micro size. Text without a typography role uses the label floor.

The KPI hero figure prefers 1.5 × the M title size, rounded in the table unit, and never goes below its minimum. The existing KPI fitting and sibling alignment stay.

TargetPreferred hero with the default M titleMinimum
dashboard27 px24 px
report30 px28 px
slide30 pt24 pt
print24 pt16 pt

Reading errors and warnings

On line charts and plain slope charts, options.highlight selects drawn data series by ID. On one plain data line without a fan, a category ID also selects that point. For example, "highlight": ["w5"] enlarges W5's marker and paints the marker and its value in the theme's focus ink. The line keeps its paint and width. The marker grows by the theme's focus-to-data stroke ratio. An authored series fill keeps priority, as with series emphasis. Marker shapes, hollow forecast markers and explicit marker: "none" remain effective. Point values stay at their regular weight unless the series itself is also highlighted.

Category emphasis adds the selected value to the requested value labels. Explicit labels: false, labels.point: false, valueLabels: "none" and cell label: false still hide it. Reference series do not count as data lines. Several data series, area, stacked, bump and fan forms keep series-only highlighting. Series IDs take precedence when a category has the same ID. An unsupported category ID, reference-series ID or unknown ID produces one highlight-unknown-id warning without changing the chart. A list that also names a valid series keeps that series highlighted. Remove the category ID from highlight to restore the ordinary marker and value.

A callout that uses a side other than preferSide reports callout-side-changed at info level. The warning names the callout and the side used. It does not change placement.

A callout or note text wider than any free seat wraps to two to four lines at the width that fits, next to its point. A line break written as \n stays where the author put it. Text that still finds no seat is named in the "Not labeled on the chart" note, as before.

story-text-truncated reports a story title cut at four lines or a body cut at ten lines. Its severity is warn. It names the step id, the line limit and options.story.steps[index].title or .body. It reports only the chosen panel layout. The suggested fix is to shorten that field or give the panel more width.

Every error and warning has one shape:

boardplot render - <<'EOF'
{ "type": "column", "data": { "categories": ["2024"], "series": [{ "id": "revenue", "values": [120] }] }, "options": { "labelDensity": "sparse" } }
EOF
{
  "ok": false,
  "errors": [{
    "code": "invalid-options",
    "message": "options.labelDensity: labelDensity accepts one of full, smart, minimal",
    "path": "/options/labelDensity",
    "expected": { "values": ["full", "smart", "minimal"] },
    "received": { "type": "string", "value": "sparse" },
    "docs": "docs/reference/column.md#options",
    "fix": [
      { "op": "test", "path": "/options/labelDensity", "value": "sparse" },
      { "op": "replace", "path": "/options/labelDensity", "value": "smart" }
    ],
    "suggest": "Use one of: \"full\", \"smart\", \"minimal\"."
  }]
}

options.locale: "de" means { language: "de" }. A language sets words only. Decimal and grouping marks come only from options.locale.decimal and options.locale.thousands. A root locale on a bare chart remains invalid, with a fix that moves its value into options.

Column, combo, bar and line charts use locale strings for built-in labels and notes. English mean labels read Average 27.5. German mean labels keep Ø. Set options.strings.average to change that word. Other keys cover status labels, missing-value notes, ranks, ranges and anomaly rules. Each key is listed in the reference. options.strings also works through the React theme provider. Authored text stays as written. Unsupported languages use English built-in wording.

A partial category is named once, such as W38 to date. On combo, column, bar and variance charts, and on a line chart with one line, the words stand under the running value itself where a single value or total prints there and they fit its column; the chart then draws no partial key or axis words. On a time axis (xAxis.type: "time"), the words stand under the running value where they have room, else after the end value in the key, else under the reading below the axis, in a row of their own where the tick rows have no room. Otherwise its key comes after the series keys. With no partial key, the chart adds a note. Set strings.toDate to change the suffix and strings.partial to change a generic partial key. Combo charts hide the default value axis when all column totals are labeled. An explicit valueAxis.show still wins. Column and combo category rows try a smaller font before rotation. Combo line end labels stay inside the plot and clear the columns; a moved label has a leader to its point.

Warnings have the same shape, arrive in warnings, and leave the drawing in place. label-hidden, for example, says the solver dropped a label that had no free space; derived-mismatch says an authored total differs from the computed one. A label collision that no size resolves refuses the chart with the error label-collision, which names each hidden label and what blocks it. More room does not lift it, so React shows it at once. A size refusal, and a hidden-label refusal that more width can clear, waits in a container that is still growing until the size holds still. A value, a series name, a value line or a pinned label that finds no seat is still on the page: the chart names it in a note, "Not labeled on the chart: North 42 (Q3).". The note is a disclosure: it is in the notes list and the values-in-note warning, and prints under the plot, also under footnotes: false, where notes.show lists 'disclosure'. It is one note per chart. It names as many items as fit two footer lines at the drawn width, at most 8, reference lines and line end values first, then the rest in data order, and ends with a count, "and 236 more". A lone last item is named instead of "and 1 more" when it fits. When not even one name fits, the note only counts, "18 of 36 values". On a pinned height where the two-line note would push values off the plot, the note counts instead. A callout or note annotation that prints a value with ${value} is that value's label, so the note does not name the value again. When the height is not pinned the chart first tries more height, so labels that can be drawn are drawn; the cap applies to what is left. Every item stays in the reading's omissions and in the hover records. notes.maxListed sets the number: 'all' names every item, and 0 names none and only counts them, "18 of 36 values". strings.moreListed sets the wording of the count (a React chart with hover on adds "(tap or hover shows each value)" to the default). The info warning values-in-note counts the values and names a chart moved into a note and lists each one in detail.values, once per chart, so a check of the warnings sees them. A canvas too small to name them all is refused with size-below-floor and the height it needs. unknown-slot and pin-blocked list a label's valid slots and, apart, the ones free now, so a pin can be corrected from the message alone.

A chart with nothing to draw (no categories, series, rows or points) is reported with the one code empty-data, in the CLI and MCP findings, in the layout error and in React. In React, onEmpty is called once, and the chart shows strings.emptyMessage of the provider (default "No data to show.") instead of an error. canDraw(request) from boardplot answers without drawing: { ok: true }, or { ok: false, code, minimum? }, where code is empty-data, too-many-items or size-below-floor and minimum is the size the chart needs, so a host can hide a card. A table with no rows still draws its header and counts as drawn.

A chart whose drawn list holds more than 2,000 entries (the categories of a column, bar, combo, dot, variance, butterfly, funnel, waffle or bartable chart; the rows and columns of a heatmap or status matrix; the rows of a bullet or gantt chart; the items of a pareto, waterfall, likert or treemap chart; the bands of a pyramid; the cohorts of a cohort chart; a likert chart draws at most 500 items, and a mekko chart 20,000 categories) refuses at once with too-many-items, at the path of that list. Its layout would take minutes, and no entry would be wider than a pixel. The budget counts what the chart draws: the categories left after topN (bar, butterfly, column, dot, mekko, pareto, likert, pyramid, variance), after viewDomain and window.last on a column or combo, and after a pareto's automatic fold of a crowded tail into Rest. Aggregate the list first, or keep the largest with topN where the type takes it. A pie keeps its seven largest slices by default, and a pvm bridge draws aggregate effects, so neither has a budget. A dated line or area samples a long series instead. A line or area also refuses with too-many-items, at /data/series, when its cost is over 300,000 (drawn categories times series, plus 100 for each series; 1,999 categories by 200 series ran out of memory), or when drawn categories times series times series is over 100 million (300 categories by 700 series is only 210,000 points and still runs out of memory), counted after viewDomain, window.last and the sampling, so draw fewer series, aggregate the periods or draw part of them. A combo refuses the same way when its cost is over 20,000 (drawn categories times all its series, plus 40 for each series; 300 categories by 51 series take 10 s and 2.1 GB, and 10 by 1,000 do not finish). A column or bar chart with many series keeps its limit on categories only. Tables, scatter, histogram and box plots draw every row.

On a canvas the host pinned, a chart of a type with a compact floor (bar, bartable, box, butterfly, cohort, column, combo, dot, funnel, gantt, heatmap, histogram, likert, line, pareto, pvm, pyramid, scatter, variance, waffle, waterfall) that lacks room in full mode is drawn compact, and refused only when compact does not fit either; the refusal names the size compact needs. belowMinimum: 'refuse' keeps the full-mode refusal. A width alone and the fixed default canvas of target: "slide" and target: "print" count as pinned too. A chart with no size on dashboard or report grows to its full floor instead.

React reader cards reserve the chart frame. Loading and reader frames scale with the host, as the SVG does; fixedSize keeps their intrinsic size. A cold content-sized chart estimates its height from the data row count and row pitch plus fixed space for the chart frame. Pass prepared for the exact loading height, including measured text and automatic content height. The message sits in the center and uses the chart theme. Valid full theme objects keep their tokens even when the spec is invalid. Invalid themes use the default theme. The card keeps a supplied title and source. A long host message shows at most three lines; its title attribute keeps the full text. The reader body and host refusal content load when needed. The server and first browser pass use a minimal busy frame with the title and source. This frame inherits host typography and paint; theme resolution and theme tokens load with the reader body. It keeps findings in data-bp-diagnostics; individual code and path markers load with the reader body. Developer details load only in full mode.

Set diagnostics on BoardplotTheme to auto, full or reader. The default is auto: it selects full when process.env.NODE_ENV is not production, and reader in production. The check also works when process is absent. An explicit mode wins. Nested providers inherit the mode unless they override it.

In reader mode, size, empty and invalid-spec cards use role="status". They show no paths, codes, minimum pixels, schema values or fix patches. Diagnostics remain in data-bp-diagnostics, with codes and paths in data-bp-error-code and data-bp-error-path. The browser logs diagnostics once per card mount; invalid specs use console.error, size refusals use console.warn. Each record starts with one line of text, such as Boardplot refused: size-below-floor: …, with the code, the path and the message of every finding, and then passes the findings. Server rendering does not log them. These attributes and console records are developer access, not a data security boundary.

In full mode, a closed native Details disclosure sits below the reader message. Invalid specs use role="alert". Equal errors are grouped by code and suggestion, with a count. Paths, values and fix patches use monospace. Raw schemas stay in a second closed disclosure.

Provider strings refusalMessage, refusalHint, emptyMessage, emptyHint, failureMessage, failureHint and diagnosticDetails set the wording. English and German defaults are available. These keys belong to the React provider, not options.strings. Legacy {width} and {height} templates appear only in full diagnostics. The reader heading uses plain default wording when such a template is supplied. onRefused, onEmpty and renderRefused keep their existing host contracts.

In code, refused on a layout from layoutResolvedRequest marks a size refusal only. A layout whose own lints carry severity error is refused too: render answers it with those errors and the components draw the error card. isRefused(layout) from boardplot is true in both cases; measure reports both in refused, without geometry. The second argument of measure(request, context) takes only theme, locale and strings; any other key is ignored with the warning unknown-context-key, and a width or height belongs in options.size.

Ignored options

An option a chart type does not read is ignored with an option-ignored warning and a JSON Patch that removes the setting. A setting that already matches the drawing gives the same warning at info level: for example, valueAxis.show: false on a chart without a value axis, or legend: 'none' on slope and box charts. Unsupported settings that change a number or a scale still refuse the chart.

valueLabels modes other than 'all' are ignored on stacked, stacked100, football-field and tornado variants. These variants keep their normal labels and value axis.

Design advice

A chart contract can include a design card: what the chart says, when to use it, when another type fits better, and design guidance. Compact boardplot_describe prints the message, use, limitations and first two rules; path: "design" (CLI: boardplot describe bar --path design) prints every rule. Each rule is marked engine or describe. Render checks the engine rules on the drawn chart and returns each finding as a warning with severity advice, a code that starts with design-, one sentence and a docs link to the rule. A fix patch is included only when it can apply to the input as sent. Otherwise follow suggest; for example, a waterfall built from rows gets written advice when a patch would target generated items. Advice never changes the drawing and never refuses. A render returns at most three, the MCP server returns each code once per session, and a refused render returns none. The describe rules need the author's judgment, such as the business order of a bridge.

Other checks also return advice: height-off-ladder (an authored height between the standard height steps), dead-band (an empty band on the canvas), missing-message-title, series-overload, pie-too-many-slices, legend-redundant, line-peer-overload and pareto-tail-crowded. They do not count toward the three design findings, and the MCP server returns them with every chart that has them.

Position of bar value labels

Set options.labelPosition once to move the values on a chart's bars. The four positions match the choices in Excel. Omit the option, or use 'auto', to keep the chart's normal placement.

ValuePosition
'center'The middle of the drawn bar on each axis.
'insideEnd'Inside the edge farther from zero.
'insideBase'Inside the edge nearer zero.
'outsideEnd'Outside the edge farther from zero.

The end is the edge with the larger absolute value. The definition applies to bars on an axis and to floating bridge steps. A falling bridge step above zero has its end at the top and its base at the bottom. Below zero, the edges reverse. A step that crosses zero uses the top edge on a tie. For horizontal bars, read right and left for top and bottom.

A requested seat must fit and stay clear of other text, lines and axis-break gaps. Inside text needs its width plus 8 px and its height plus 2 px. A vertical edge seat needs its height plus 4 px. When an inside seat cannot be used, a floating bridge step tries above the bar, then below. A horizontal bridge step tries right, then left. The floating-step fallback keeps that order below zero too. A bridge total or a bar on an axis falls back outside its end. A zero-length bar uses an outside seat. Segment values keep their existing thin-segment fallbacks. Values with muted words such as “to date” or “(partial)” use outside seats.

Integrated variance totals use the requested seat only when one paint holds the whole label. Their fallbacks remain insideBase, then insideEnd. Integrated totals never move outside. The variance caps and delta labels keep their positions.

On a column with a reference series (role: "reference", drawn as a tick), the plan tick draws behind its column and reaches up to 4 px past each side, or 2 px where a plan value beside it needs the room. The column stays whole, and the two ends that stand out beside it mark the plan, however near the plan is to the column's top. A column short of its plan prints its value inside its end, under the tick, and not above the tick, where it would read as the plan's value. Every column short of plan takes that one seat, at every width. To draw the tick over the column on a page-color band, the earlier look, set referenceTick: { position: "front" }. The value of a column short of plan then stands between the column and the tick where it fits. To keep the value above the tick, pin it: labelPlacements: { "point:revenue:fy23": "outsideTopShifted" }. A reference value beside its tick stays in the gaps beside its own column. Where only a seat over a neighbor's column is free, the value goes to the notes. Where the chart has one reference series, the key names it and a named value ("400 Plan") is too wide for the gap beside its column, every value of that series prints the number alone ("400"). To keep the name, set the tick content: labels: { tick: ["absolute", "series"] }.

Chart and variantSupported values
Waterfall, vertical or horizontal, including cases; PVMAll
Grouped column and bar; histogram; absolute varianceAll
Mekko bar; butterfly; pyramidAll
Combo with one column series; ParetoAll
Stacked and stacked100 column and bar; stacked and stacked100 Mekko; LikertAll except 'outsideEnd'
Combo with two or more column series; integrated varianceAll except 'outsideEnd'

A total above two or more stack parts stays above the stack. A stacked column or bar with one drawn part moves its total with the option, except in stacked100. A combo column with one drawn part moves its total too. Waterfall segment values and the sums or totals of bridge bars with two or more segments keep their existing seats. A bridge bar with one segment moves its value with the option, as a plain step does. A plain step's colorRole (such as neutralLight for a gray step) keeps that seat on its own fill. PVM's net change takes the space directly past the closing bar when its total moves inside.

labelPlacements pins take precedence and keep their existing slot meanings. labelDensity, valueLabels, labels and authored cell labels still decide which values print. labelPosition takes precedence over the theme's marks.barLabels setting. The chart keeps the plot room reserved by its normal placement. A grid panel accepts the option through that panel's own options.

Football-field and tornado bars, relative variance, bullet, funnel, bartable and chart types without supported bar values do not accept the option. A combo without column series accepts only 'auto'. Unsupported variants and values report label-position-unsupported at options.labelPosition and list accepted values.

Moving text and drawing on a chart

This section covers three things: moving a label, a bracket's seat, and four drawing annotations.

Which option moves a label

On one plain data line without a fan, options.pointLabelSide defaults to "shape". The first finite value prefers the left of its point, a strict local peak prefers above, a strict local trough prefers below, and the last finite value prefers the right. The endpoint values get room beside their points only where the plot can spare it. The centered end room must print every category name, the names must print the same with the side room, and no label that the centered end room prints may be lost. Otherwise the endpoint values keep the centered end room. Flat plateaus keep their previous preference. Reference series do not count as data lines. Several data series, area, stacked, bump and fan forms keep the previous placement. The label solver can use a fallback to avoid collisions, and labelPlacements pins take precedence. A reference line through a preferred seat blocks that seat. The solver uses the next candidate instead of cutting the reference line around the value. Set "pointLabelSide": "auto" to restore the previous candidate order and endpoint reserves. valueLabels, labels and cell labels still decide which values print.

A shaded band's name keeps its existing placement preference within the plot, including reserved annotation headroom. A name that would leave the plot tries the existing inside seats first, on one line and then two lines. To keep the previous outside seat of a band with id: "maintenance", set options.labelPlacements to { "annotation:maintenance": "aboveBandEnd" }. Pins keep their previous candidate order. The solver still checks a pinned seat for collisions and uses a fallback when the seat is blocked.

Read a label's id

Each label of an SVG render carries label: and its id in data-id, such as label:annotation:callout-2 for the id annotation:callout-2 or label:sum:price for sum:price. An annotation's id comes from its id, otherwise from its kind and its position in annotations. To list every id, give labelOffsets an id that does not exist: the warning label-offset-unknown names the valid ids of that render.

labelOffsets

options.labelOffsets maps a label id to { x, y }, in px on the rendered chart. Positive x moves right, and positive y moves down.

{
  "type": "waterfall",
  "data": {
    "items": [
      { "id": "open", "label": "Opening", "type": "total", "value": 200 },
      { "id": "volume", "label": "Volume", "value": 42 },
      { "id": "costs", "label": "Costs", "value": -36 },
      { "id": "close", "label": "Closing", "type": "total" }
    ]
  },
  "annotations": [{ "kind": "callout", "at": "costs", "text": "Energy contracts renewed" }],
  "options": { "labelOffsets": { "annotation:callout-1": { "y": -40 } } }
}

Where a bracket stands

The brackets of one waterfall stand on one row: the lowest row that clears every bracketed span and its values. A single bracket stands directly above its own bars and their values. A bracket moves to the row at the top of the plot when its label, run or ticks would meet something on its row. The plot keeps room above it for that top row only where a bracket stands there. Where every bracket stands on its row below, the empty band goes back to the plot. bracketRow: "span" stands each bracket directly above its own bars and their values instead. A valueLine authored after a bracket is not yet claimed when the bracket chooses its seat, so author the value line first to keep the bracket off it.

On a waterfall, the total change, a diff or delta between the bridge's first and last total, runs as the growth bracket, as a far difference does on a column chart: a leg up from each total, a run above the brackets, and the difference on the run, such as +6 (+3%) for mode: "both". A difference between other totals, or one that names a step or a case, keeps the arrow at the bars. placement: "label" keeps that arrow for the total change too.

Drawing annotations

Four annotation kinds draw on data positions, so a drawing stays on its data at every size.

KindFieldsDraws
textat, text, id, priorityText on the point, or above, below, right or left of it, 8 px away. Text inside a bar gets a halo, and text never straddles a bar's edge. Text that finds no seat, such as on a pie slice or a filled heatmap cell, goes to the note with a warning. ${value} prints as written.
linefrom, to, dashed, idA straight line.
arrowfrom, to, dashed, idA straight arrow, with its head at to.
boxfrom, to, dashed, idAn unfilled box, with from and to as opposite corners. A corner given by category takes the outer edge of that category's band, so the box wraps whole bars and their values. from and to may name one category.

A point is an anchor such as "q2", { "categoryId": "q2", "seriesId": "plan" } or { "pointId": "p7" }, or a category with a value in axis units: { "categoryId": "q2", "value": 120 }. A line or arrow end given by category sits on the category's center.

A line or arrow end may also be { "annotationId": "launch-note" }, the id of a text annotation. The end then attaches to the nearest edge of that text, 4 px away for an arrow and 3 px for a line, wherever the text seats at the drawn width. An id that names no text annotation, and a text that finds no seat, give bad-anchor and draw nothing.

{
  "type": "column",
  "data": {
    "categories": [{ "id": "q1", "label": "Q1" }, { "id": "q2", "label": "Q2" }, { "id": "q3", "label": "Q3" }],
    "series": [{ "id": "orders", "label": "Orders", "values": [30, 60, 45] }]
  },
  "annotations": [
    { "kind": "text", "id": "contract", "at": { "categoryId": "q1", "value": 70 }, "text": "New contract" },
    { "kind": "arrow", "from": { "annotationId": "contract" }, "to": { "categoryId": "q2", "value": 64 } }
  ],
  "options": { "valueAxis": { "min": 0, "max": 80 } }
}

Log scales on a line

Set options.valueAxis.log to true or 'y' to draw a plain line with positive values and value-axis bounds on a log10 axis. Area and bump variants, percent mode, trends, phases, monotone fans, and gap fills with mismatched or monotone interpolation are refused.

Named reference bands on a line

Use options.referenceBands on a line when the reader judges one long series against a few fixed regimes, such as the strong, typical and down cycles of a growth rate. Each band is one level (value) or a range (low, high) in the value-axis units, drawn thin and neutral behind the line. Its bold label and plain description stand in a column right of the plot, and an elbow leader ties a name to its band where the names had to spread apart. For the number at a point, a callout with "headline": "${value}" prints the value from the data in bold over its text, and "arrow": true points at the point.

{
  "type": "line",
  "data": {
    "categories": ["2019", "2020", "2021", "2022", "2023", "2024", "2025", "2026"],
    "series": [{ "id": "growth", "label": "Sensor-module sales growth", "values": [-11, 7, 26, 3, -8, 19, 45, 52] }]
  },
  "options": {
    "title": "Sensor-module growth left the typical cycle in 2025",
    "subtitle": { "measure": "Year-over-year sensor-module sales growth" },
    "unit": "%",
    "referenceBands": [
      { "value": 45, "label": "45+", "description": "strong cycle" },
      { "low": 20, "high": 25, "label": "20 to 25", "description": "typical cycle" },
      { "low": -10, "high": -5, "label": "−5 to −10", "description": "modest down cycle" }
    ]
  }
}

Common mistakes:

The line reference has the full recipe under "Cycle bands", and the fixture cycle-bands draws 583 monthly points this way.

valueLine.text is read as label when label is absent or equal, with an info warning and a rename fix. Different text and label values remain refused. indicator100.text remains refused.

A named valueLine prints its name and its number, "Normal load 53%". Where the series prints the same number at its end beside the line, the name stands alone just left of that value, so the number prints once: "Normal load" next to "53%". A label with ${value}, such as "Normal load ${value}", always prints the number.

For a valueLine with value: "mean", seriesId selects the series. A paired from and to selects the inclusive category window. The mean line spans only that window. Adjacent shaded band annotations have a hairline between them, so each period remains distinct.

Times and numbers on the x axis of a line

A line or area draws data.categories as evenly spaced names by default. For readings at real times, or along a measured distance, give data.x and options.xAxis instead. The chart then places each reading by its value, so 7 minutes and 55 minutes keep their spacing, and it draws its own ticks: 1, 5, 15 and 30 minutes up to hours, days, weeks, months, quarters and years for times, and 1-2-5 steps for numbers. series[].values give one value per x, in the order of data.x, with null for a missing reading.

{
  "type": "line",
  "data": {
    "x": ["2026-10-25T01:00", "2026-10-25T02:30", "2026-10-25T02:30", "2026-10-25T03:10", "2026-10-25T05:00"],
    "series": [{ "id": "hall", "label": "Hall", "values": [20.4, 20.1, 19.9, 19.8, 20.6] }]
  },
  "options": {
    "title": "The hall cooled through the extra hour",
    "unit": "°C",
    "xAxis": { "type": "time", "zone": "Europe/Berlin" }
  }
}

The fixtures x-time-daily, x-time-berlin-dst, x-time-uneven-sensors and x-number-trail show the forms.

Calendar ticks on dated categories

A line, column or combo chart takes options.categoryAxis.dateTicks (years, quarters, months, weeks or days) when every category has an ISO date. A short tick under the row marks the first category of each interval, and the labels name those intervals. On column and combo the tick stands at the middle of its band, and every column keeps its place. A category without a date, or categories not in date order (for example sorted by value), leave the option unused and warn date-ticks-unsupported. categoryAxis.crossesBetween is a line setting: column and combo ignore false and warn cross-between-ignored.

Themes

A theme sets colors, type sizes, spacing and the scenario patterns. The presets are bridge (the default), bridge-dark (its dark pair), boardroom, standard, standard-dark, notation, notation-dark, capital, studio and glass. Use theme: "boardroom" for the old light look and theme: "standard-dark" for the old dark look. The host passes bridge-dark when it needs a dark chart. Presets do not switch automatically.

Bridge keeps the engine's measured default font stack: 'Helvetica Neue', Helvetica, Arial, Roboto, sans-serif. Bridge keeps the engine's role type sizes, which the render target replaces for a preset. A host with width tables for its own licensed brand font can set type.family and pass its own measurer, as described in FONTS.md.

The notation preset follows the IBCS® Standards; IBCS is a registered trademark of the IBCS Institute, and the standards are published under CC BY-SA 4.0 at www.ibcs.com.

A theme object containing only { overrides }, at the spec root or in options.theme, uses the default bridge preset. A full theme object keeps its existing meaning.

space.canvas overrides can contain only base or wide, and any subset of top, right, bottom and left. Missing classes and sides keep the preset values. Each side stays within 0 to 96 px. A class needs a side object, so write { base: { top: 16 } } instead of { base: 16 }.

A brand theme is a preset plus overrides:

{
  "type": "column",
  "data": { "categories": ["2024", "2025"], "series": [{ "id": "revenue", "values": [120, 135] }] },
  "theme": { "preset": "bridge", "overrides": { "color": { "highlight": "#0B5CAD", "series": ["#0B5CAD", "#5B8DB8", "#A9C1D9"] } } }
}

The target replaces the type sizes of a preset; a size that overrides names still wins. A full theme registered under its own name keeps its sizes; typeForTarget(theme.type, target) from boardplot/theme rebuilds them for a target and keeps families, weights and line heights.

A theme key that boardplot removed is refused with invalid-theme-override or invalid-theme, a suggest and a patch that removes it. type.eyebrow.case is removed: KPI eyebrows and waffle panel labels print names as written, so write capitals in the name to keep them. If the theme widened type.eyebrow.tracking for capitals, set type.eyebrow.tracking back or remove it. Absent means no letter-spacing, and a name in mixed case reads too wide with capital tracking.

An override can give color.series one or two colors. These colors come first. The remaining slots come from the preset, with colors that repeat an authored color skipped. An override with three or more colors keeps its own ramp and overflow policy. A full theme needs at least one color. It draws a two-series chart in exactly its two colors, and series past the end of its ramp follow color.seriesOverflow.

Design system colors

Set colorblindSafe: true to use the theme's color-blind good/bad pair on supported marks, including KPI deltas and chips and waterfall and pvm steps. Every chart accepts the option, and a chart with no affected marks draws the same.

Color fields accept hex, the supported color keywords, rgb() / rgba(), hsl() / hsla() and oklch(). For example, oklch(65% 0.15 270) becomes #6c88ea. Space-separated functions accept / alpha, as in hsl(210 50% 40% / 50%). Hue accepts degrees, deg, grad, rad and turn. OKLCH lightness accepts a number or percent; 100% chroma means 0.4. Missing components (none) become zero. Relative colors, calc(), color-mix() and other color spaces are not supported. Use their computed literal color instead.

Boardplot converts new color forms to 8-bit sRGB before drawing. It clips each linear RGB channel to 0–1, applies the sRGB transfer function, then rounds each channel to the nearest byte. Alpha is kept. This is a fixed channel clip, so a color outside sRGB can differ from a browser's gamut mapping. Contrast checks use the same bytes that the SVG draws. Existing hex and comma-separated RGB spellings keep their output bytes.

var(--brand, #1f4e79) is accepted with a required color fallback. Boardplot always draws the fallback. It does not read the page variable, and it warns css-var-fallback-used once per variable: the warning names the variable, the color it painted and the repair below. The fallback can itself be oklch() or hsl(). Bare var(--brand), currentColor and an invalid fallback are refused with a fix. This rule is the same in React, SVG, PNG, CLI and MCP. It prevents a page variable from changing the fill while the label keeps ink chosen for another fill.

When the page changes a variable later, the chart does not change. For a page theme switch, pass new literal token values in the same update as the preset:

import { BoardplotTheme } from 'boardplot/react/theme';
import { ColumnChart } from 'boardplot/react/column';

export function BrandChart({ dark = false }) {
  const theme = {
    preset: dark ? 'bridge-dark' : 'bridge',
    overrides: { color: { series: [dark ? '#8cbcff' : '#1f4e79'] } },
  };
  return <BoardplotTheme theme={theme}>
    <ColumnChart data={{ categories: [{ id: 'a' }], series: [{ id: 'core', values: [42] }] }} />
  </BoardplotTheme>;
}

Keep shared design tokens in application data when possible. If CSS owns the tokens, read getComputedStyle(element).getPropertyValue('--brand').trim() after the page has applied its theme. Pass that literal value as the override and repeat the read on each page theme switch. Choose the element that contains the chart, since variables can differ by page section. The host owns this update. Boardplot adds no DOM observer and reads no page state during server rendering.

Stable series colors

Assign colorRole from one map keyed by series id before filtering or rendering. Use the same map for every chart and export. A series-N role always selects step N of color.series, with N starting at 1. It does not select a step of options.palette. An explicit fill still wins over colorRole. Series of one chart that share a role draw in distinct steps of its color. Gantt bars, sankey nodes, status cells and slope lines without a key keep the one color, because their position or label names each item.

const series = [{ id: 'core', values: [42] }, { id: 'extra', values: [18] }];
const selectedIds = new Set(['extra']);
const roleById = { core: 'series-1', extra: 'series-3', other: 'others' } as const;
const colouredSeries = series.map(s => ({
  ...s,
  colorRole: roleById[s.id as keyof typeof roleById],
}));
const visibleSeries = colouredSeries.filter(s => selectedIds.has(s.id));

Map every id whose color must stay fixed. Unmapped series keep the automatic order-based colors. The map is application data; no provider state or new boardplot option is needed. Roles follow the active theme, so a light-to-dark theme change keeps the series' rank while the theme chooses its color. Use a shared map to fill instead when each id must keep an exact literal color, and check that color on both page themes.

If the ramp runs out, boardplot keeps its repeat policy and warns. series-colour-repeated names each group that shares a color. series-indistinguishable names keys with the same color and shape. Group the tail into an “Other” series only when the values add. Otherwise use small multiples, or supply more distinct colors and assign them with colorRole or fill. Changing seriesOverflow to cycle still repeats colors. The boardroom preset keeps its old eight colors and their order.

Render checks color roles present in the chart layout. validateTheme(theme) from boardplot/validate checks the full theme. Color findings name the measured colors, vision mode and floor; contrast ratios round down to two decimals.

A full token object with its own name works too. boardplot_describe with type theme lists every token with its type and default.

In code, registerTheme makes a full token object available under its name to every chart, and resolveTheme returns a theme resolved and frozen, from a name or from { preset, overrides }. Import both from boardplot/theme: it links no chart engine. The package root exports them too, but it registers the whole catalog, so a host that draws through boardplot/react/<type> would carry every engine in its main bundle.

Layout measures text with bundled width tables for Geist, Helvetica and Arial, taking the first family of the stack that has one. Helvetica Neue is measured with the Helvetica widths (Liberation Sans), because no free Helvetica Neue font exists; for exact Helvetica Neue widths, build tables with boardplot fonts build (FONTS.md). Inter has no table: the capital and glass presets lead with Inter and are measured as Helvetica Neue, the next family in their stack, so on a machine with Inter installed their text draws a little wider than measured. A leading family outside these, Inter and the metric clones Arimo, Liberation Sans and Nimbus Sans returns the warning family-outside-metric-class, a licensed brand font included; boardplot fonts build <font-dir> writes the tables for a licensed font (FONTS.md). Boardplot rejects a theme for low contrast (contrast-ink below 4.5:1, contrast-ink-muted below 3:1), an unsupported color (unparseable-color; see Design system colors), good and bad colors that look alike (good-bad-similar) or an unknown token (invalid-theme). These errors carry the path /theme.

Where the reference is