May this could help you;
- usa microflow as datasource for your char
- keep a type for each case in your $currentObject/case
-retrieve the data for your chart based on the $currentObject/case and return it to your chart
-for better performance and a more dynamic database query you can also think to a OQL query in your datasource microflow