change chart data structure