differentiate between the investment objects in a colomn chart. (color)

Hi, What i want is to fix differentiate in a colomn chart. I created a useless entity  and created a microflow where i create an object but don't commit. I did this because otherwise i couldn't fix a column chart in a data view. The problem is that i have more objects in the same year in the chart that i want to show, only the data view show 1 bar  with 1 investment. How can i fix that the column chart sum up the total investment in a particular year and then differentiate the bar in different colors or something where you can see differentiation between different objects. The objects Year:   Aanschaf Waarde=Investment.  Want to fix differentiation of objects in the same year    
1 answers

Hello Mayhan,

Maybe someone else can offer an easier solution, but I know this is possible with the ChartJS StackedBarChart widget. I would recommend setting up your domain model like I have done. You will need to create a pretty complicated microflow that creates all of the objects for your chart. In the microflow you will need to retrieve all of your investment data from the database and make use of loops and variables to create the objects. For this particular case, your microflow will create 1 MultiSeriesChart object, 4 MultiSeriesDataSet objects, and 24 DataPoint objects. The most important part will be to create placeholder DataPoints for all of the years for which there are no investments.

Here is the end result:

Here is my domain model structure:

Here is my page in the modeler:

Here are the settings for the widget:

And here is the data that you will need to create in the microflow "DS_MultiSeriesChart":

One difficult aspect will be dynamically setting the color values for a variable number of data sets. In the past, I have created an entity called Color that can store that data.