You can use the hierarchy drill-down data discovery on the Colors shelf of the Lines, Bars, Areas, Grouped Bars and Scatter visuals. To use the drill-down, click on the legend colors.
Note that you must create the hierarchy in advance, on the Dataset Field interface.