Skip to content

WaffleOptions

Defined in: packages/waffle/src/types.ts:4

Everything layoutWaffle takes besides the data.

optional columns?: 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.


optional encoding?: Encoding

Defined in: packages/waffle/src/types.ts:6

Which dimension drives what. Defaults to the first dimension arranging, colouring and shaping.


optional gap?: 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.


optional maxMarks?: 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.