llms-full.txt · diff
git:20260925.7112986 to git:20260925.a35c494
20 added, 18 removed. Audit A to A.
# markvis (full)
Quantitative Markdown charts. Path: fence | GFM | HTML comment → parser → Chart IR → SVG + table fallback.
## Grammar
1. Optional `markvis: 2`
- 2. CORE headers: `type`, `title`, `theme`, `palette`, `unit`, `x`, `y`, `series`
- 3. Type-local encodings when legal: `layout`, `innerRadius`, `min`, `max`
+ 2. CORE headers: `type`, `title`, `theme`, `palette`, `surface`, `unit`, `x`, `y`, `series`
+ 3. Type-local encodings when legal: `layout`, `innerRadius`, `min`, `max`, `orient`, `role`
4. Blank line
5. CSV or GFM table with a header row
Language tags `chart`, `markvis`, `vis` share one parser.
## Types (CORE)
| type | notes |
| --- | --- |
- | bar | keep row order; optional `layout` |
- | line | multi-series via `series`; keep row order; optional `layout` |
- | area | same order rule as line; optional `layout` |
- | scatter | numeric x and y |
- | pie | values ≥ 0; do not normalize to 100; optional `innerRadius` |
- | hist | continuous x; table keeps raw rows |
- | heatmap | x cat × series cat, y intensity; long form; series required |
- | funnel | x stage, y ≥ 0; keep order; series ignored |
- | waterfall | x step, y signed delta; running baseline; series ignored |
- | radar | x spoke, y ≥ 0; optional series; scale max = max(y) or 1 |
- | gauge | first row; optional min/max; series ignored |
- | sankey | x source, series target (required), y flow ≥ 0; one row = one link |
+ | bar | keep row order; optional `layout`; optional `orient: horizontal` |
+ | line | multi-series via `series`; keep row order; optional `layout`; empty y is a gap |
+ | area | same order rule as line; optional `layout`; empty y is a gap |
+ | scatter | numeric x and y; repeated rows stay |
+ | pie | values ≥ 0; do not normalize to 100; optional `innerRadius`; empty y is E_MISSING_VALUE |
+ | hist | continuous x; table keeps raw rows; repeated samples stay |
+ | heatmap | x cat × series cat, y intensity; long form; series required; empty y is missing, not zero |
+ | funnel | x stage, y ≥ 0; left-aligned bars; label beside the bar; conversion rounded to one decimal; series ignored |
+ | waterfall | x step, y signed delta; optional `role` column; totals are not inferred from the label |
+ | radar | x spoke, y ≥ 0; optional series; one shared scale; missing spoke is a gap |
+ | gauge | one row (a second row is E_DUP_KEY); omit max → 100; series ignored |
+ | sankey | x source, series target (required), y flow ≥ 0; one thickness scale; a cycle is E_SANKEY_CYCLE |
| treemap | x label, y ≥ 0; optional series parent; two levels max |
## Encodings
| field | legal on | values | omit |
| --- | --- | --- | --- |
| layout | bar line area | grouped \| stacked \| percent | grouped |
| innerRadius | pie | [0, 1] | theme PIE_INNER_RATIO (explicit 0 = solid) |
- | min | gauge | number | 0 |
- | max | gauge | number | max(y, 1) |
+ | min | gauge, heatmap | number | gauge 0; heatmap data min |
+ | max | gauge, heatmap, radar | number | gauge 100; heatmap data max; radar data max |
+ | orient | bar | horizontal \| vertical | vertical |
+ | role | waterfall | column of delta \| total \| subtotal | every row is a delta |
Wrong type / bad value → E_UNKNOWN_FIELD + table. Do not invent donut, stacked-bar, sunburst, or chord type ids. Gauge with both min and max set requires min < max.
## Errors (stable codes)
- E_UNKNOWN_TYPE, E_TYPE_TYPO, E_JSON_DATA, E_MISSING_HEADER, E_EMPTY_DATA, E_EXTRA_COLUMN, E_DUP_COLUMN, E_UNKNOWN_FIELD, E_PIE_NEGATIVE, E_NEGATIVE_VALUE, E_YAML_TABLE_CONFLICT, E_EMPTY_FENCE, E_UNKNOWN_THEME, E_UNKNOWN_PALETTE.
+ E_UNKNOWN_TYPE, E_TYPE_TYPO, E_JSON_DATA, E_MISSING_HEADER, E_EMPTY_DATA, E_EXTRA_COLUMN, E_DUP_COLUMN, E_UNKNOWN_FIELD, E_PIE_NEGATIVE, E_NEGATIVE_VALUE, E_YAML_TABLE_CONFLICT, E_EMPTY_FENCE, E_UNKNOWN_THEME, E_UNKNOWN_PALETTE, E_BAD_VERSION, E_BAD_NUMBER, E_MISSING_VALUE, E_DUP_KEY, E_SANKEY_CYCLE.
Optional `theme:` grammar pack: folio|highcharts|shadcn|docs|ant|recharts (default folio).
Optional `palette:` color table: ink|porcelain|warm|cool|vivid (omit → theme default colors). Theme ≠ palette.
Invalid → table + one-line error. Never drop recovered rows.
## Examples
See examples/valid/01–08 (canonical) and SPEC.md. Natural-language → fence: examples/prompts.md.
## Product boundaries
- No chart runtimes in core. No JSON-as-default data. Do not invent donut / sunburst / chord / stacked-bar as type ids (use encodings or the Wave 2–3 packs). Structure diagrams stay outside this language. Full type catalog grows as packs; see docs/TYPES.md.
+ No chart runtimes in core. No JSON-as-default data. Do not invent donut / sunburst / chord / stacked-bar as type ids. Structure diagrams stay outside this language. The catalog is the thirteen types in the table above. See docs/TYPES.md.