RallyChart Pie - Is there a way to consolidate data labels?

68 Views Asked by At

I'm wondering if there is a way to consolidate data labels into one. Here's a simple example for context: if I had a pie chart with labels "Apple", "Banana", "Grapefruit", "Broccoli", "Lettuce"-- is there a way for me to group the data associated with "Broccoli" and "Lettuce" into a "Vegetables" label? I don't really even need to reference "Broccoli" and "Lettuce" afterwards, I would just need the "Vegetables" label that aggregates them into one label.

Any and all help would be great.

Thanks!

1

There are 1 best solutions below

0
On

Here is an example of how to combine defects into "Open" and "Closed" categories based on their State attribute that has four AllowedValues:

Ext.define("MyDefectCalculator", { 
            extend: "Rally.data.lookback.calculator.TimeSeriesCalculator",
            getMetrics: function () {
                var metrics = [
                   {
                        field: "State",
                        as: "Open",
                        display: "column",
                        f: "filteredCount",
                        filterField: "State",
                        filterValues: ["Submitted","Open"]
                   },
                    {
                        field: "State",
                        as: "Closed",
                        display: "column",
                        f: "filteredCount",
                        filterField: "State",
                        filterValues: ["Fixed","Closed"]
                    }
                ];  
                return metrics;
            }