hist
Use when x is a numeric sample to bin (Sturges equal-width). Optional y is sample weight. The table keeps raw rows.
Do not use for pre-aggregated categories (bar) or unlabeled continuous series (line).
x number · y optional weight · series ignored
Rules. Continuous x; renderer bins; table keeps raw rows.
Example
chart
markvis: 2
type: hist
title: Sample distribution
x: value
value
1.2
2.4
2.1
3.5
4.0
3.8| value |
|---|
| 1.2 |
| 2.4 |
| 2.1 |
| 3.5 |
| 4.0 |
| 3.8 |
When the block is wrong
The rows stay, with one line that names the error.
chart
markvis: 2
type: hist
bins: 12
title: Unknown extra field
x: value
value
1.2
2.4
3.5| value |
|---|
| 1.2 |
| 2.4 |
| 3.5 |
E_UNKNOWN_FIELD: undeclared fence field: bins
Generated from packages/types/hist/ and the type's row in SPEC.md.