fixing sort for spectra chart