← Files DataARCHIVED FILE

skills/visualize-data/docs/charts/annotations.md

2.55 KB · Nov 27, 2026 · 12:12 UTC

↓ Download file

# Annotations

These options belong to the shared chart config for inline, Page and React charts. Bind reference lines and bands to physical axes; point annotations label observed rows. React can pass the same config to its [app chart](../react/app-charts.md#example-with-supplied-uncertainty). Existing apps using the legacy split props keep their original encoding.

All options inside spec; single measure, no grouping. References/points: line,area,bar,horizontalBar,scatter. Uncertainty bars: line/bar/horizontalBar/scatter; band:line only. No arbitrary layers/second axis/inferred statistics. Reference axis names the physical dimension: y for vertical values, x for horizontalBar. Numeric x lines for line/scatter; line also exact category, ISO time between observations, or between:[anchorA,anchorB] with fraction0–1 default.5 and no value. Anchors each unique; supplied event timing only. If timing missing show chart without marker and note it, no waiting. Category/time line X refs incompatible with logX/numeric xDomain or explicit xScale:"category"; no category/time X bands.
Numeric references finite original coordinates, band from<to, positive on log; automatic domains expand, explicit domains must include references/intervals. Max8 lines+8 bands, labels≤160chars. Fixed bands are not rowwise uncertainty.
Point field actual measure, at exact supplied category/X (Y for horizontal bars) matching one row. Repeated X uses unique stable spec.rowId + annotation rowId instead; string/numeric distinct, no both selectors; verify IDs, absent/filtered omits, never relocates. No inferred peaks/interpolation. Max8 annotations, unique nonempty IDs≤100chars, labels≤160. Use `tone:"warning"` for adverse bound exceedances, `negative` for a failure or `positive` for a favorable result; default neutral. Keep concise labels beside the points without arrowed connectors. Best-effort placement may put full label in note; dense permanent attached labels/custom positions need fallback.
Set `spec.uncertainty` to `{"lower":"lower","upper":"upper","style":"bars"}` using the actual bound-field names. `style` is required; only line allows `"band"`.
Uncertainty lower/upper distinct fields of absolute bounds, not ±distance; every observed row finite lower≤measure≤upper, unique X/category, positive lower on logY. Missing line y/lower/upper all explicit null; bar/scatter cannot be missing. Keep supplied endpoints; label supplied meaning/confidence (≤160chars), otherwise Interval. Tooltips show estimate/endpoints. No grouped/stacks/X/area/sparkline uncertainty; never omit required bounds.

SHA-256: 1fb7d347940b8daa38b31046b55dbf0c29fc5895af8a1c1029cedb58bc5819c9