I am trying to create a stacked BarChart
where each BarChart
has different ChartLabels
. Consider the following example:
BarChart[{{5, 6, 7, 5, 7}, {8, 5, 6, 7, 8}}, ChartLayout -> "Stacked",
ChartLabels -> {Placed[{"One", "Two"}, Above],
Placed[{5, 6, 7, 5, 7}, Center]}]
But what I would like to have is separate labels for the segments in the two chart elements. The following image illustrates this:
I can't figure out how to do that using ChartLabels
. When I try providing multiple lists for the chart labels it doesn't work.
BarChart[{{5, 6, 7, 5, 7}, {8, 5, 6, 7, 8}}, LabelingFunction -> (Placed[#1, Center] &), ChartLayout -> "Stacked"]
$\endgroup$