sort components for each bar