Expand description
Round 1 (docs/round-1-contract.md §3, Chart): the numbers every painter
must agree on — the value extent per kind and the “nice” axis ticks
(Heckbert’s nice numbers), the series colour order and the donut hole.
Pure; geometry (bars, arcs) stays each painter’s. Mirrors src/chart.ts.
Structs§
- Chart
Series - One series as the painter reads it off the Chart props.
- Extent
- Ticks
Constants§
- DONUT_
HOLE - The donut’s hole as a share of its radius (pie = 0).
- WINDOW_
THRESHOLD - Rows past which Table and List window their children (
layout.json).
Functions§
- chart_
extent - The value range the y axis spans:
mindefaults to 0 (lower when a value is negative),maxto the largest value — the largest category SUM forstackedBar;sparklinespans its own min..max. - nice_
ticks - Axis ticks over [min, max]: a nice step (1, 2 or 5 × 10^n) giving about
targetticks, the range widened to whole steps, every tick rounded to the step’s decimals. - series_
color - The colour token of series (or slice)
index: its tone’s colour when set, else$color.chart1..8in order, wrapping.