Hi everyone,I would like to ask if some of you could help me display some data on a donut chart. I'm taking the (dynamic) data from an Aggregate, and I need to:
Right now, I have the values in percentages, but they aren't correct because they are just the value + "%".How should I calculate the correct percentage? Or, better yet, how should I write the calculation? I have attached a screenshot below for a better understanding of the issue.Many thanks in advance.
Hello @Sabrina Fiore
First of all, for future notice, to make the collaboration with the community more efficient always try to share a sample oml with what you've tried so far.
For your use case, the right way to do it should be to calculate the percentages on your data source and those percentages should be the ones to be displayed.
Example:
Then you could use "Tooltip" to show the percentages directly on the Donut Chart to be rendered when you hover it:
in runtime:
Hope it helps!
Cheers,GM
Hi @Sabrina Fiore ,
Just for example take 3 test values in %
like : 10 , 20 and 30
Using these test value below is the calculation:
where 60 is sum of all values:
(1) for 10
(100/(60))*10 --- 16.66%
(2)for 20
(100/(60))*20 -----33.33%
(3)for 30
(100/(60))*30 ----- 50%
In outsystems you simply create a calculate attribute in aggregate apply above calculation.
Regards,
Rajat