Marimekko Charts

Overview

Marimekko is a Finnish home furnishings, textiles and fashion company. It made important contributions to fashion in the 1960s. It is particularly noted for its brightly colored printed fabrics and simple styles, used both in women's garments and in home furnishings. Marimekko designers created hundreds of distinctive patterns and helped to make Marimekko a household name across the world.

The Marimekko name has been adopted within business and the management consultancy industry to refer to a specific type of bar chart known as a variable-width chart or Mosaic plot in which all the bars are of equal height, there are no spaces between the bars, and the bars are in turn each divided into segments of different width. The design of the mosaic plot resembles a Marimekko print. The chart's design encodes two variables (such as the percentage of sales and market share).

ModulesCore + Mekko
API
Classanychart.core.mekko.series.Mekko
DATA
Data Fieldsx, value
Multiple SeriesYES
OPTIONS
StackedYES
VerticalYES
3DN/A
Error BarsN/A
SUPPORTED CHART PLOTS
PolarN/A
RadarN/A
ScatterN/A
StockN/A
RELATED TYPES
Bar Mekko
Mosaic Chart
Column Chart
Bar Chart
Stacked Charts
SEE ALSO
Chartopedia: Marimekko Mekko Chart
Chartopedia: Marimekko Bar Mekko Chart
Chartopedia: Marimekko Mosaic Chart
General Settings

Modules

The Marimekko chart requires adding the Core and Mekko modules:

<script src="https://cdn.anychart.com/releases/8.12.0/js/anychart-core.min.js"></script>
<script src="https://cdn.anychart.com/releases/8.12.0/js/anychart-mekko.min.js"></script>

Learn more: Modules.

Quick Start

Marimekko is built on top of column chart with some specific settings, in AnyChart, we've broken down Marimekko charts into 3 specific cases which are created by the different constructors.

Mekko

A Mekko chart with %-axis (often called marimekko chart or 100% cost curve) is a two-dimensional 100% chart. As in the 100% chart, the value axis is based on percentages and column heights are shown relative to 100%. In the regular 100% chart, since the columns are scaled to relative heights, there is no visual representation of absolute column totals.

This type of marimekko chart is created with mekko() constructor:

chart = anychart.mekko();

See the basic sample and read more in later in this article.

Playground

Bar Mekko

A Mekko chart with units (sometimes also called submarine chart or olympic chart) is a two-dimensional stacked chart. As in the regular stacked chart, the value axis and the datasheet of this chart are based on absolute values.

This type of marimekko chart is created with barmekko() constructor:

chart = anychart.barmekko();

See the basic sample and read more in Bar Mekko Chart article.

Playground

Mosaic

Mosaic chart is pretty much the same as the basic Mekko chart but with one important difference: the Y-scale is ordinal and contains series names instead of numbers.

This type of marimekko chart is created with mosaic() constructor:

chart = anychart.mosaic();

See the basic sample and read more in Mosaic Chart article.

Playground

General Settings

In AnyChart there are many settings that are configured in the same way for all chart types, including the Mekko chart (for example, legend and interactivity settings).

Read the overview of general settings: General Settings.

Special Settings

Stacked Mode

When Mekko chart is created, both its scales are put into stacked mode: the Y-scale to percent stacked mode and X-scale to value stacking mode.

Changing the Y-scale to value stacked mode but consider using theBar Mekko Chart in such cases.

Changing the X-scale will convert Mekko chart into usual percent stacked column chart.

Padding

Padding between points is a special setting in Mekko charts, it is controlled with pointsPadding() method and sets the distance between elements (tiles), it serves only aesthetic purpose and it is set to different default values in Mekko, Bar Mekko, and Mosaic constructors.

Appearance

All Points

The appearance settings of a Mekko chart can be configured in three states: normal, hover, and selected. Use the normal(), hovered(), and selected() methods.

Combine them with the following methods:

Also, you can use some other methods from anychart.core.StateSettings.

In the sample below, there are two Mekko series with appearance settings configured:

// create the first series
var series1 = chart.mekko(seriesData_1);

// configure the visual settings of the first series
series1.normal().fill("#99004d", 0.5);
series1.hovered().fill("#99004d", 0.3);
series1.selected().fill("#99004d", 0.7);
series1.normal().stroke("#99004d", 1);
series1.hovered().stroke("#99004d", 2);
series1.selected().stroke("#99004d", 4);

// create the second series
var series2 = chart.mekko(seriesData_2);

// configure the visual settings of the second series
series2.normal().fill("#004d99", 0.5);
series2.hovered().fill("#004d99", 0.3);
series2.selected().fill("#004d99", 0.7);
series2.normal().hatchFill("forward-diagonal", "#004d99", 1, 15);
series2.hovered().hatchFill("forward-diagonal", "#004d99", 1, 15);
series2.selected().hatchFill("forward-diagonal", "#004d99", 1, 15);
series2.normal().stroke("#004d99");
series2.hovered().stroke("#004d99", 2);
series2.selected().stroke("#004d99", 4);

Playground

Individual Points

You can change the appearance (and some other settings) of individual points by adding special fields to your data:

// create a data set
var data = anychart.data.set([
  ["QTR1", 10000, 12500],
  ["QTR2", 12000, 15000],
  ["QTR3", 13000, 16500,  "#ef6c00", null],
  ["QTR4", 10000, 13000],
]);

// map the data
var seriesData_1 = data.mapAs({x: 0, value: 1});
var seriesData_2 = data.mapAs({x: 0, value: 2, fill: 3, stroke: 4});

// create a chart
chart = anychart.mekko();

// create series and set the data
var series1 = chart.mekko(seriesData_1);
var series2 = chart.mekko(seriesData_2);

Playground

Labels

Labels are text or image elements that can be placed anywhere on any chart (you can enable them on a whole series or in a single point). For text labels, font settings and text formatters are available.

Tooltips

A Tooltip is a text box displayed when a point on a chart is hovered over. There is a number of visual and other settings available: for example, you can edit the text by using font settings and text formatters, change the style of background, adjust the position of a tooltip, and so on.

Vertical Marimekko Chart

Most types of series in AnyChart can be drawn both in horizontal and vertical orientation: Vertical Charts (Overview).

Here is information about creating Vertical Mekko Charts: