WaffleInput
Defined in: packages/waffle/src/types.ts:26
layoutWaffle’s one argument. The items array is treated as immutable: work is cached against
it, so pass a new array when the dataset changes.
Extends
Section titled “Extends”Properties
Section titled “Properties”columns?
Section titled “columns?”
optionalcolumns?:number
Defined in: packages/waffle/src/types.ts:11
Cells per row. Defaults to a square grid, the smallest that holds every mark. Pass 10 with 100 marks for the classic one-cell-per-percent waffle.
Inherited from
Section titled “Inherited from”dimensions
Section titled “dimensions”dimensions: readonly
Dimension[]
Defined in: packages/waffle/src/types.ts:30
Every dimension the items carry values for; the encoding picks among them.
encoding?
Section titled “encoding?”
optionalencoding?:Encoding
Defined in: packages/waffle/src/types.ts:6
Which dimension drives what. Defaults to the first dimension arranging, colouring and shaping.
Inherited from
Section titled “Inherited from”
optionalgap?:number
Defined in: packages/waffle/src/types.ts:13
The space between neighbouring cells, as a share of the cell pitch, 0 to 0.9. Defaults to 0.15.
Inherited from
Section titled “Inherited from”items: readonly
Item[]
Defined in: packages/waffle/src/types.ts:28
One per cell (below the cap). Unique ids.
maxMarks?
Section titled “maxMarks?”
optionalmaxMarks?:number
Defined in: packages/waffle/src/types.ts:19
Above this many items, cells stand for several items each. Defaults to 1,000: 32 cells a row, each still a few pixels wide at phone width. A layout can exceed it slightly, since every combination of encoded categories needs a cell.