legend button and panel. Fixes #82