Date sorting for line chart