test buttons show/hide legend