reverse data for chart