BarMekko Chart

Overview

A Mekko chart with a single series and units is called BarMekko in AnyChart, it is often used with one series only.

The difference between this constructor and other variations are:

Quick Start

To create a chart, use the anychart.barmekko() chart constructor.

To add a series call the mekko() method.

The following sample demonstrates how a basic BarMekko chart is created:

// create a data set
var data = [
	{x: "Spring", value: 20},
	{x: "Summer", value: 30},
	{x: "Autumn", value: 100},
	{x: "Winter", value: 40}
];

// create a chart
var chart = anychart.barmekko();

// create a mekko series and set the data
var series = chart.mekko(data);

// set the container id
chart.container("container");

// initiate drawing the chart
chart.draw();

Playground

General Settings

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

Read the overview of general settings: General Settings.

Special Settings

Apperance

Barmekko appearance is tuned similar to basic Mekko chart or Column chart.

Multi Series

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

You can create multiseries barmekko chart the same way you always do:

Playground

Vertical BarMekko Chart

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

Here is the information about creating Vertical BarMekko Chart:

You are looking at an outdated v7 version of this document. Switch to the v8 version to see the up to date information.