Skip to content

Bar Mekko ​

Variable-width bars with absolute heights: width encodes one metric, height another.

  • Bar width – first data row after the header (not drawn as a segment)
  • Bar height – later rows stack on a real value axis (not normalised to 100%)

Classic Marimekko normalises every column to 100% height. Use Bar Mekko when height must stay in real units (revenue, passengers, …).

Identity ​

chartTypebarMekko
Option bagbarMekko (not mekko)
seriesData layoutwidthRowThenHeightRows
Min grid3 rows × 2 columns (header + width + ≥1 height series)
OrientationWidth along domain; value axis often hidden by default
SampleBar Mekko

Minimal chartData ​

js
{
  chartType: 'barMekko',
  isDataTransposed: true,
  seriesData: [
    ['', 'Enterprise', 'Mid-market', 'SMB', 'Startup'],
    ['Accounts', 120, 85, 200, 350],   // width – sizes bars, not drawn
    ['Core revenue', 48, 16, 8, 3],    // stacked height
    ['Add-ons', 14, 12, 10, 6],
  ],
  title: { visible: true, text: 'Revenue by segment' },
  subtitle: {
    visible: true,
    text: 'Bar height = revenue (€m) · width = number of accounts',
  },
}

seriesData ​

With isDataTransposed: true (recommended):

RowRole
Row 0Category labels
Row 1Width values – one per category (not drawn)
Row 2+Height series – stacked inside each bar
js
[
  ['', 'Enterprise', 'Mid-market', 'SMB'],
  ['Accounts', 120, 85, 200],
  ['Core revenue', 48, 16, 8],
  ['Add-ons', 14, 12, 10],
]

Positive segments stack up; negative stack down. Shared layout rules: chartData schema · seriesData.


Option bag: barMekko ​

FieldDefault (new charts)Role
sort'heightDesc'Column order along the width axis
overrides{}Per-bar patches (column-first)

sort values: heightDesc · heightAsc · widthDesc · widthAsc · dataOrder.

js
{
  chartType: 'barMekko',
  seriesData: [/* … */],
  barMekko: { sort: 'widthDesc' },
}

Do not put these fields on mekko – wrong bag.


Axes & scales ​

RoleBehaviour
DomainLinear width domain (category thickness)
Primary rangeAbsolute value scale; often visible: false by default (totals + domain labels can be enough)

Format the value side when you show it. Details: Axes · by chart type · Domain axis.


Type-specific behaviour ​

  • Width row is structural – it is not a legend series you “hide.”
  • Sorting rearranges columns along the width axis; it does not change the grid math.

Pitfalls ​

  • Only two rows (missing a height series) – fails min grid
  • Putting width in a later row or treating width as a drawn segment
  • Using mekko bag / expecting 100% heights

Developer documentation for Chartbuddy Embed · Not the end-user Help Center · Help Center