OK, so you want to use a pie() chart. It plots the numerical percentage of a numerical value for an attribute.
However, I think you want to do something slightly different. You want a pie chart of a figure that doesn’t (yet) exist, i.e. the count of each discrete value for the items matching the agent. Is this correct?
If so you’ll need to abstract that data to a new container, each of whose children is one of those values. for each ‘value’ note, e.g. “Active”. You then store the count (which you’ll calculate via action code) of the occurrence of that value in a Number-type attribute which you use as the pie plots data source.
Note, the label on the pie chart’s legend is always $Name and you can’t change that, i.e. you can’t show the count value in the label.
So, I thin it is do-able, albeit with some assembly. If you want that new functionality ‘baked in’ to the app you could always make a feature request. If it seems odd this additional feature doesn’t already exist, I don’t recall this need ever being asked about before; either people haven’t needed it, or they tried and failed but never discussed the fact.