Have you seen this documenation: https://docs.mendix.com/howto/front-end/charts-dynamic-series
Pretty step by step on how to create the dynamic series.