Static documentation

Data Visualisation Catalogue Gallery

Rendered markdown notes for the catalogue review, compiler mapping, implementation tracker, and chart method specs.

38 chart methods
10 with reference assets
43 documents

Bar Chart

Source: Data Visualisation Catalogue - Bar Chart

Bar chart reference

Bar chart anatomy

Why This Belongs In The Compiler Gallery

The catalogue frames bar charts as discrete numerical comparisons across categories. This is the compiler's most direct fit: categorical band position, linear value scale, rect bars, guide lines, and text labels. A faithful implementation also provides the baseline against which grouped, stacked, histogram, and population-pyramid variants can be compared.

Data Contract

Each data row represents one category.

FieldTypePurpose
category or labelcategoricalDiscrete bar category.
valuequantitativeBar length or height.
formattedValuetext, optionalEnd label and tooltip value.
seriescategorical, optionalColor grouping when bars are filtered or faceted.
sortOrderordinal or quantitative, optionalExplicit category ordering.

Expected Visual

The catalogue reference uses vertical columns, but the compiler gallery can support vertical or horizontal orientation. Faithful reproduction should keep discrete categories separated by consistent gaps, align all bars to a shared zero baseline, and use one continuous quantitative axis.

ElementExpected treatment
BarsRects with equal width in vertical mode or equal height in horizontal mode.
BaselineShared zero line. Negative values should extend opposite the positive direction.
AxisOne categorical axis and one quantitative value axis.
LabelsCategory labels on the band axis; optional value labels outside or above bars.
ColorSingle fill by default; categorical color only when it encodes data.

Compiler Mapping

Compiler partMapping
Data sourcebars table.
TransformOptional aggregate when raw rows need count/sum by category.
Scalesx: band, y: linear for vertical; swap for horizontal.
Layersrect bars, line baseline/grid, text category and value labels.
InteractionBar hover should return category, value, and source rows.

Faithfulness Notes

The catalogue distinguishes bar charts from histograms because bars compare discrete categories rather than continuous bins. The gallery should keep that distinction in the docs, labels, and sample data. Do not reuse histogram bin labels for bar categories.