ordering the chart data