Adding legend with switches