Marimekko

@nivo/marimekko

The Marimekko component is somewhat similar to a bar chart, but it allows you to use an extra dimension to compute the thickness of each bar.

It also shares some behavior of the Stream chart regarding the way we can configure the offset.

The responsive alternative of this component is ResponsiveMarimekko.

You can also see more example usages in the storybook.

See the dedicated guide on how to setup legends for this component.

roll the dice
Actions Logs
Start interacting with the chart to log actions
Base
RawDatum[]required

Chart data, which should be immutable.

string | (datum: RawDatum): string | numberrequired

ID accessor.

string | (datum: RawDatum): numberrequired

Value accessor.

{ id: string, value: string | (datum: RawDatum) => number }required

Data dimensions configuration.

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

Optional formatter for values.

stringoptionaldefault:'vertical'

How to display bars.

OffsetIdoptionaldefault:'none'
none

Offset type.

numberoptionaldefault:0
px

Space before the first bar and after the last one.

numberoptionaldefault:3
px

Space between bars.

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.

objectoptional
px
px
px
px

Chart margin.

Ref<SVGSVGElement>optional

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

Style
Grid & Axes
Customization
Interactivity
Motion
Legends