Histogram
histogramBlock elementGraph
A bar chart rendered inside a diagram using pre-binned data. Each bar spans between adjacent bin edges with a height equal to its value. Supports multiple colours, vertical or horizontal orientation, and optional count labels.
Attributes
valuesRequiredImplicit
number-listbinsRequired
number-listcolours
colour-listDefaultblue
orientation
histogram-orientationDefaultvertical
show-labels
booleanDefaultfalse
label
rich-texthidden
booleanDefaultfalse
lock
booleanDefaultfalse
text-size
Default20
Stacking order. Higher z renders on top; when omitted or equal, elements stack in document order (later on top).
Allowed in
Examples
histogram(
bins: 0, 10, 20, 30, 40
values: 5, 12, 8, 3
colour: teal
)histogram(
bins: 0, 10, 20, 30
values: 4, 9, 6
colours: red, green, blue
show-labels: true
)histogram(
bins: 0, 5, 10, 15
values: 3, 7, 2
orientation: horizontal
colour: purple
)