Stacked Column/Bar Chart

A stacked column/bar chart uses stacks of vertical columns or rows of sequential bars to represent groups of data. This is useful when you have a number of totals with breakdowns. The Stacked Column/Bar Chart will favour drawing a stacked column chart, which is easier to read, but will switch to a stacked bar chart if there is too much data to comfortably fit along the x-axis.

Interactions

On hover a tooltip shows the total and breakdown of a stacked column or bar.

Usage

The first data column is the name of the entity or group. All subsequent data columns represent a data series. The chart will draw a coloured column/bar for each series, with the series name shown in the key.

Example


Date Ice cream Umbrellas Horse shoes
2004 1500 6500 4200
2005 1045 6000 4567
2006 6400 1500 4908
2007 1400 3500 5600
2008 1000 7500 6007
2009 1090 4500 5670
2010 1010 5600 6432
2011 5500 1400 4032
2012 1100 8000 3002
2013 3400 2500 1023
2014 6000 1700 900
2015 6500 1000 3583

Options

The following data attributes are available for a Stacked Column/Bar Chart:

data-fm-axis-label
Adds a label to the axis used for values (which depends if stacked column or bar chart is being shown)
data-fm-value-prefix
Adds a prefix to the values. For example, you may wish to add the ‘£’ symbol before each number
data-fm-value-suffix
Adds a suffix to each of your values. For example, you may wish to add the ‘%’ symbol after each number
data-fm-height
Enforces an explicit height. Expects a value with CCS syntax, e.g. "250px" (see sizing guide)
data-fm-width
Enforces an explicit width. Expects a value with CCS syntax, e.g. "800px" (see sizing guide)
data-fm-enable-spillover
If "true", the column/bar chart will draw some transient elements outside of its configured height and width (see layout guide)