Skip to content

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
Sample distribution hist chart. Sample distribution. x=value. 6 rows. x is binned with Sturges equal-width bins. Sample distributionSample distribution 0 1 2 3 1.21.2 1.91.9 2.62.6 3.33.3 44 count value · Sturges bins 1 2 0 3
Sample distribution
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.

0.0.13 lives under legacy/