Selective inclusion of elements in BarChart Legend

Further to my previous question, is there a concise way - amenable to automated setting in a package so that it can be accessed globally - to eliminate some legend item that would otherwise show? For example, in this example, I'd like to only show the orange rectangle and text "Preliminary estimates".

I tried a couple of replacement rules, by analogy with belisarius’s answer for reversing stacked bar chart legends, such as the example below, but it doesn’t seem to make any difference.

BarChart[RandomVariate[NormalDistribution[0, 0.6], 40],
ChartStyle -> Join[ConstantArray[Green, {39}], {Orange}],
ChartLegends ->
Placed[Join[ConstantArray[None, {39}], {"Preliminary estimates"}],
Bottom]] /. Pane[Row[x_]] :> Pane[Row[Last[x]]]

-
You could build a GUI that allows you to select which items are shown in a legend via checkboxes but the solutions below are more straight forward for specific cases. – Mike Honeychurch Jun 4 '12 at 0:38
@MikeHoneychurch well, in principle I could, but in practice, that won't be me :) – Verbeia Jun 4 '12 at 1:33
...as per this video: ibnhconsulting.blogspot.com.au/2011/11/… – Mike Honeychurch Jun 4 '12 at 2:06

The reason your code doesn't work is because the legends are typeset using a Row with two arguments (where the second argument is a separator which should be placed between the entries in the legend) but you're matching to a Row with only one argument. You could instead do something like

BarChart[RandomVariate[NormalDistribution[0, 0.6], 40],
ChartStyle -> Join[ConstantArray[Green, {39}], {Orange}],
ChartLegends ->
Placed[Join[ConstantArray[None, {39}], {"Preliminary estimates"}],
Bottom]] /. Pane[Row[x_, ___]] :> Pane[Last[x]]


Edit

Another way to selectively label entries in the BarChart is to do something like this

BarChart[RandomVariate[NormalDistribution[0, 0.6], 40],
ChartStyle -> Join[ConstantArray[Green, {39}], {Orange}],
ChartLegends ->
Join[ConstantArray[
None, {39}], {Placed["Preliminary estimates", Bottom]}]]

-
I just realised that some months ago I had come up with the second option you posted here and forgotten about it! It's definitely the cleanest option for my purpose. – Verbeia Jun 4 '12 at 0:00

Use MapAt to apply the Legended and Style wrappers directly to the last item in the dataset:

data = RandomVariate[NormalDistribution[0, 0.6], 40];

data = MapAt[Legended[Style[#, Orange], "Preliminary estimate"] &, data, -1];

BarChart[data, ChartStyle -> Green, LegendAppearance -> "Row"]


-

Of course, this got a lot easier in version 9:

BarChart[RandomVariate[NormalDistribution[0, 0.6], 40],
ChartStyle -> Join[ConstantArray[Green, {39}], {Orange}],
ChartLegends -> Placed[SwatchLegend[{Orange}, {"Estimate"}], Bottom]]


-
Definitely simpler. – rcollyer May 10 '13 at 13:34