DC.js - 显示忽略交叉过滤器维度的总元素
DC.js - show total elements ignoring a crossfilters dimension
我想显示 2 个号码:
- 元素总数(过滤后的维度)
- 元素总数(没有特定维度过滤器的总数)
元素总数(过滤维度)作品:
var numRecords = cf.groupAll();
DimFiltered = cf.dimension(...).filter(...); // filter function will be automatically applied
numberDisplayElem
.group(numRecords)
.valueAccessor(x => x);
元素总数(没有自动应用过滤器)不起作用:
如何从维度“DimFiltered”获取没有过滤器的总数作为另一个数字?
我认为您正在寻找 dimension.groupAll 而不是 crossfilter.groupAll
:
Note: a grouping intersects the crossfilter's current filters, except for the associated dimension's filter. Thus, group methods consider only records that satisfy every filter except this dimension's filter. So, if the crossfilter of payments is filtered by type and total, then groupAll by total only observes the filter by type.
我想显示 2 个号码:
- 元素总数(过滤后的维度)
- 元素总数(没有特定维度过滤器的总数)
元素总数(过滤维度)作品:
var numRecords = cf.groupAll();
DimFiltered = cf.dimension(...).filter(...); // filter function will be automatically applied
numberDisplayElem
.group(numRecords)
.valueAccessor(x => x);
元素总数(没有自动应用过滤器)不起作用:
如何从维度“DimFiltered”获取没有过滤器的总数作为另一个数字?
我认为您正在寻找 dimension.groupAll 而不是 crossfilter.groupAll
:
Note: a grouping intersects the crossfilter's current filters, except for the associated dimension's filter. Thus, group methods consider only records that satisfy every filter except this dimension's filter. So, if the crossfilter of payments is filtered by type and total, then groupAll by total only observes the filter by type.