How to make a Pie or a normal Chart

For sure you want to use shape painter for drawing chart

Next thing you want is same as HP calculation formula to get % of your current HP providing your max and current HP value

100 / MaxHealth * CurrentHealth

Where 100 here represents 100%

Now your equation would be
100 / Maximum value * Number from array var

You can now spit results to some other array vars
And now tricky part would be to draw each pie chart with shape painter on top of each other
BUT part i do not know how to do is to how to rotate other shape painter to end of previous shape painter so they line up like actual chart

For that someone else would need to come up with some idea
I would assume it would be something like equation
360 / Max value * Previous array var value
360 instead of 100 cause we want 360° here
And now we get what kind of angle we should rotate next shape painter object based on what was value of previous shape painter