Waffle

@nivo/waffle

A waffle component. You can fully customize it using the cellComponent property to define your own cell component, if you wish to do so you should have a look at native SVG component for available properties.

You can also see more example usages in storybook.

The responsive alternative of this component is ResponsiveWaffle, it also offers other implementations, see WaffleHtml and WaffleCanvas.

roll the dice
Actions Logs
Start interacting with the chart to log actions
Base
numberrequired

Max value.

object[]required

Chart data.

string | (value: number) => string | numberoptional
open editor

Optional formatter for values.

numberrequired

Number of rows.

numberrequired

Number of columns.

stringoptionaldefault:'top'
↑ top

How to fill the grid, it's also going to affect the transitions if motionStagger > 0.

numberoptionaldefault:1
px

Padding between each cell.

Datum['id'][]optionaldefault:[]

Hide parts of the data by id

numberrequired

Chart width for non-responsive component.

numberoptional

Chart default width for responsive component.

numberrequired

Chart height for non-responsive component.

numberoptional

Chart default height for responsive component.

number (ms)optional

Debounce width/height updates for responsive component.

(dimensions: { width: number; height: number }) => voidoptional

A callback for when responsive component is resized.

numberoptionaldefault:'Depends on device'

Adjust pixel ratio, useful for HiDPI screens.

supportsvghtmlcanvas
objectoptional
px
px
px
px

Chart margin.

Ref<SVGSVGElement | HTMLDivElement | HTMLCanvasElement>optional

Ref to the chart's container. Used on this page to generate/download the chart's image via html-to-image.

Style
Customization
Interactivity
Legends
Motion
Accessibility