This chart was inspired by Mike Bostock's Stacked to Grouped Bar Chart. A variation of this chart is currently being used by SEMOSS, an open-source linked-data business intelligence platform.
This chart combines the stacked-to-grouped functionality with the filtering in order to customize what series are shown. The grouped or stacked option can be chosen from the radio buttons while filtering is done through clicking the legend squares.