Changing Y axis acording to data resorting