This does not look like related to SelectableLegend, hide series etc... ? If not I think this should not go in this pull request but a separate one if needed. If yes please explain.