Use generics for chart data