Only show the pie chart legend when selected and when the bar graph is not shown, see #64