Only one visible legend group at once

Hi! I need to show only one legendgroup at once. When user click another legend element - only this element become visible. I saw documentation about ‘itemclick’ and ‘itemdoubleclick’, but can’t use them as I want. I need always behaviour not toggleothers, but ‘hide all others’. May be it possible by event ‘legendclick’?

Hope for your advice!