Grouped and Stacked barplot





Grouped and Stack barplot display a numeric value for several entities, organised into groups and subgroups..

Step by step - ggplot2

The hardest part in stacked area chart creation is the use of the d3.stack() function to stack the data. Once this step is done, each group can be added thanks to the d3.area() function. I strongly advise to understand how to do a basic area chart before trying the examples below.





Basic R

A stacked area chart showing the evolution of a few baby names in the US. Zoom on a specific time frame through brushing. Highlight a specific group by hovering the legend. Double click to unzoom.

Related chart types


Grouped and Stacked barplot
Treemap
Doughnut
Pie chart
Dendrogram
Circular packing