我正在尝试使用 dc.js 创建一个显示前 5 个 URL 的行图,并将其余的(不是前 5 个)分组到“其他”中。根据我在网上搜索的内容,可以通过在 capMixin 下使用 cap() 和 othersGrouper() (https://www.tutorialspoint.com/dcjs/dcjs_capmixin.htm)
这是我的代码的一部分:
urlChart
.width(300)
.height(250)
.dimension(url)
.group(numOfUrl)
.xAxis().ticks(4)
.cap(10)
.othersGrouper(false);
我收到错误说 cap() 和 othersGrouper() 不是函数。所以我想知道我在这里做错了什么。