Legend visibility changes depend on which view is selected