Span Chart
Source: Data Visualisation Catalogue - Span Chart
Why This Belongs In The Compiler Gallery
Span charts are a lightweight interval family. They reuse the compiler's interval transform and prove that start/end geometry can render as line ranges with endpoint symbols, not only Gantt-style rect bars.
Data Contract
Each raw row is one category with paired start and end values.
| Field | Type | Purpose |
|---|---|---|
metric | categorical | Row label. |
previous | quantitative | Raw start value. |
current | quantitative | Raw end value. |
start | quantitative, derived | Normalized lower interval value. |
end | quantitative, derived | Normalized upper interval value. |
duration | quantitative, derived | Difference between start and end. |
Expected Visual
Each category has one horizontal span line from start to end, with endpoint markers to make the comparison scannable.
Compiler Mapping
| Compiler part | Mapping |
|---|---|
| Data source | metric-ranges raw table and derived spans table. |
| Transform | interval computes start, end, duration, center, labels, and tooltip fields. |
| Scales | x: linear(value), y: band(metric). |
| Layers | line span ranges plus point endpoint markers. |
| Guides | Generated x/y axes and x gridlines. |
Faithfulness Notes
The core span chart is compiler-owned through the existing interval transform. Time-based spans still need a true time scale and date-aware tick formatting.