Hello every one ,
I have Stages : manyToOne relation with Tasks and Tasks got different type of statue (Finished,under construction,not planned) ,I want to use a PIECHART to display the progress using specified color (Green,Red,Yellow) for each state of each Stage.
Like in this exemple:
Stage A | Tasks For A :
Task2(under construction 'Yellow')
Task3 (finnished 'Green')
Task4(not planned 'Red')
=> the Pie should display (80% green ,10%Red,10%yellow)
My problem is that PIE Chart can take only one attribut and I can't fix the color depending on statue
You are correct, the default Pie Chart doesn't have the ability to do what you want, so you will have to do a bit of pre-processing in a microflow. You can create new entities and add a dataview on your page powered by a microflow data source. In that microflow, you can retrieve and build the display entities you need to make the chart look how you want. If you are using the Charts package (https://appstore.home.mendix.com/link/app/105695/) Then you set your colors using the 'Colors' menu of the Chart Properties tab. Set your color in order, then use the sort feature on the 'data points' tab to make sure your color order matches the 'statue' of your Stages.
So, the trick here is to use the sort option to match the colors you set with your desired status.