如何让dc.js饼图正常显示数据?

how to make dc.js pie chart display data properly?

我有这个 fiddle,其中我试图从我的数据集中获得一个 dc.js 饼图显示 5 "regions":https://jsfiddle.net/eugene_goldberg/yv3nnred/6/ 这是数据集:

var data = [
        {date: "2015-03-25T12:10:00", resolver: "Group 1",  escalation_pct: 20, bubble: 5, region: "Americas", x: 1},
        {date: "2015-03-25T12:15:00", resolver: "Group 2",  escalation_pct: 10,  bubble: 5, region: "AMEA",  x: 1},
        {date: "2015-03-25T12:25:00", resolver: "Group 3",  escalation_pct: 50, bubble: 10, region: "Nordics", x: 1},
        {date: "2015-03-25T12:40:00", resolver: "Group 4",  escalation_pct: 30,  bubble: 1, region: "Americas", x: 1},
        {date: "2015-03-25T12:35:00", resolver: "Group 5",  escalation_pct: 5, bubble: 10, region: "Australia", x: 1},
        {date: "2015-03-25T12:45:00", resolver: "Group 6",  escalation_pct: 13,  bubble: 1, region: "UK&I", x: 1}
    ];

由于某种原因,饼图无法正确显示区域名称。 它还有一个切片为亮橙色,但我没有指定任何特定颜色。 我该怎么做才能解决这个问题?

您有 .slicesCap(4),这意味着(我相信)它将显示 4 个切片加上一个 "Other" 切片。如果您将其更改为 .slicesCap(5) 或只是删除它,它将开始显示您的 UK&I 切片。