Umar,
Pie chart only accepts one series. So to plot those two values in a pie chart, you’ll have to create a separate entity and populate those values as separate objects in that entity with a label and a value.
Mike
Hi Umar Shabbir!
Try using Google chart widget : https://appstore.home.mendix.com/link/app/2091/
Download Google chart widget.
Create a dataview with datasource as microflow and place Google piechart widget inside the dataview.
In Microflow, create an object (ex: Result) with one attribute of type string with the below JSON value and return this object. (Can be a non-persistent one too!)
{
"cols": [
{"id":"","label":"Name","pattern":"","type":"string"},
{"id":"","label":"Percentage","pattern":"","type":"number"}
],
"rows": [
{"c":[{"v":"FreeSpace","f":null},{"v":'+$Diskspace/FreeSpace+',"f":null}]},
{"c":[{"v":"UsedSpace","f":null},{"v":'+$Diskspace/UsedSpace+',"f":null}]}
]
}
Note: You can also add multiple rows to show values of multiple attributes.
Now configure the Google pie chart widget with data source as shown below:
Now the Piechart gets generated with the rendered values of two different attributes!
Hope this helps!
Thanks!