I have records like this :
{
{"Pass": "10", "Fail": "20", "Untested": "40"}
{"Pass": "20", "Fail": "40", "Untested": "50"}
{"Pass": "30", "Fail": "50", "Untested": "60"}
...
}
Obviously, total = pass + fail + untested. I want to sum up each of these values and then finally show a pie chart using dc.js that shows total Pass, total Fail, total Untested. I couldnt find a good example.
In the example below, each record is converted to a binary loss/gain value. Then the pie chart shows the aggregated loss/gain. I need to aggregate at the collection level, not individual record level. How can I do that ?
Any help is much appreciated.
Ref: