right ordering of legend, and color in groups