merge and sort chart data when compare to the past year