# Separating halves of a PairedBarChart

Question 1: How can I separate the halves of a PairedBarChart so as to create enough room for long labels, as in this example?

PairedBarChart[{3, 4, 6, 25, 4}, {1, 5, 5, 22, 3},
ChartLabels -> {"Long label 1", "Long label 2", "Long label 3", "Long label 4", "Long label 5"},
BarSpacing -> {0, .5},
AxesLabel -> {Text[
Style["Headcount", FontFamily -> "Times", 14, Italic]],
Text[Style["Function", FontFamily -> "Times", 18, Italic, Black]]}]

Question 2: How can I label the horizontal axes differently, so on the left I have "Headcount A" and on the right "Headcount B"?

Of course, one could kludge together two separate BarCharts using Row and such, but that brings up scaling and alignment problems. I'd like to achieve these within PairedBarChart.

Question 1: BarSpacing takes a three-value form in this case:

With the setting `BarSpacing->{$s_p$, $s_g$, $s_b$}, $s_p$ can be used to control the space between the pair of bar charts. The unit for $s_p$ is in fractions of the width of the resulting graphic.

chart =
PairedBarChart[
{3, 4, 6, 25, 4}, {1, 5, 5, 22, 3},
ChartLabels -> {"Long label 1", "Long label 2",
"Long label 3", "Long label 4", "Long label 5"},
BarSpacing -> {35, 0, .5},
AxesLabel -> {
Text[Style["Headcount", FontFamily -> "Times", 14, Italic]],
Text[Style["Function", FontFamily -> "Times", 18, Italic, Black]]}
]

Question 2: I found no direct method through options of PairedBarChart. A slightly kludgy workaround is to replace the first occurrence of the formatted label. Below is a helper function to do that replacement. We first find the first occurrence of the $x$-axis label to replace with FirstPosition then replace it with MapAt.

Clear[replaceAxis]
MapAt[
# /. f_@Style[First@rule, opts___] :> f@Style[Last@rule, opts, addopts] &,
chart,
FirstPosition[chart, f_[Style[First@rule, ___]]]
]

Here is a usage example on the chart generated above: