add groupBy functionality to panels.