many eyes many eyes
Can't delete this data set? That's because it has either visualizations or comments attached to it.
Can't delete this? That's because it has comments attached to it.
Sign in
  • explore
    • visualizations
    • data sets
    • comments
    • topic hubs
  • participate
    • register
    • create visualization
    • upload data set
    • create topic hub
  • learn more
    • quick start
    • visualization types
    • data format & style
    • about Many Eyes
    • FAQ
    • blog
  • contact
    • contact us
    • report a bug
  • legal
    • terms of use

Stack Graph for Categories

When to use a stack graph for categories

A stacked graph is meant for visualizing the total change over time of a group of quantities. Because items are "stacked," this type of graph is especially useful when it makes sense to add up the underlying data points. For example, a stacked graph is good for sales data, since you may be interested not only in sales of individual items but also want to know how total sales varies over time. For simple data sets you may be able to use a simple stack graph. But if your data items are arranged into categories and subcategories, it makes sense to use a stack graph for categories.

How a stacked graph for categories works

The Many Eyes stacked graph for categories is shown below.

Each ribbon of color in the graph represents a data item changing over time. In this graph the ribbons represent United States government spending on different budget items. The height, or thickness, of each ribbon represents the dollar figure for spending. The overall height of the graph shows the total spending.

In many data sets, such as this one, items are arranged into categories and subcategories. The tree outline at left provides a color key to these categories. It allows lets the user drill down into the data by expanding and collapsing categories. As the user drills down, the color scheme will adjust so that there is always a wide range of colors in the graph. The tree control itself contains tiny "sparkline" graphs that show the trend for each subcategory and category.

The "percentage" checkbox will adjust the graph so that each ribbon shows the percentage of the total for that point in time, rather than an absolute number. This option is helpful for emphasizing the relative sizes of the ribbons.

Data requirements

A stacked graph requires a somewhat complex data table. To create the categories and subcategories, Many Eyes will look at all the text columns, in order from left to right. The leftmost text column will be uswed for the highest-level category, the next for the level below that, and so on. Numeric columns will be used for the values of the graph, again in order from left to right.

An example data set suitable for a stacked graph is:

TypeFood2000200120022003
FruitBanana1456145614561456
FruitLemon23232323
FruitOrange981981981981
MeatPork111111111111
MeatBeef442442442442
MeatChicken1456145614561456

Important: The numbers in the value column should not be negative, since the stacking technique in the graph would no longer make sense. Negative values will be treated as zeros.