This sub-template creates a single vertical complex bar of averages for use as a color key in Template:Stapeldiagram2.

{{Stapeldiagram2/medelvärden
| style  = 1
| scale  = 2
| columns = 6   |2009|2010|2011|2012|2013|2014
| green|  Apples|  10|  0 |  40|  30|  20| 10
|yellow| Bananas|  20|  10|   0|  40|  30| 20
|orange| Oranges|  30|  20|  10|   0|  40| 30
|   red|Cherries|  40|  30|  20|  10|   0| 40
|  blue| Berries|   0|  40|  30|  20|  10|  0
}}
100
Apples
Bananas
Oranges
Cherries
Berries
Average