O'Reilly logo

Instant Wijmo Widgets How-to by Tochi Eke-Okoro

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Stacked bar chart (Simple)

A stacked bar chart is a graph that is used to compare the parts that make up the whole. Each bar in the chart or graph is divided into other groupings, classifications, or combinations.

Getting ready

Assuming we want to compare the sex ratios of males and females in certain sports, we could have them as follows:

  • Bar A (Soccer): Boys 75% | Girls 25%
  • Bar B (Tennis): Boys 50% | 50%
  • Bar C (Swimming): Boys 45% | Girls 55%

The preceding statistics can be represented in a stacked bar chart. It is important to note that the major difference between a stacked and a regular bar chart is the seriesList property or option. Secondly, there's the addition of a new Boolean option called stacked, which should be set to true.

In an attempt ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required