在dc.js行图中隐藏指定的行 [英] Hide Specified Row in dc.js rowchart
问题描述
有人知道有很好的技巧可以在crossfilter / dc.js的行图中隐藏行,即不要绘制特定键。
Does anyone know a good hack to hide a row from a row chart in crossfilter/dc.js, that is do not chart a particular key.
我想要显示一些相对较小的%s并隐藏适合其他类别的99%(并防止用户在该行上进行过滤)。
I want to show some relevantly small %s and hide the 99% which fits in the other category (and prevent a user from filtering on the row).
这不起作用...在过滤数据时
This doesn't work...as it filters the data
function remove_bins(source_group) {
return {
all:function () {
return source_group.all().filter(function(d) {
return d.key = 1;
});
}
} };
varfiltered_group = remove_bins(myGroup);
var filtered_group = remove_bins(myGroup);
我只需要防止图表显示大行。我希望最好在图表内完成。
Where I just need to prevent the chart from displaying the huge row. Preferably done within the chart, I expect.
欢迎任何想法!
Ryan。
推荐答案
为在用户组上回答。
看一下FAQ:其中有关于预过滤数据的部分。您应该能够很容易地适应这些示例之一。
Take a look at the FAQ: there is a section about pre-filtering the data. You ought to be able to adapt one of these examples pretty easily.
https://github.com/dc-js/dc.js/wiki/FAQ#filter-the-data-before-其图表
如果需要,将在此处添加详细信息。
Will add detail here if needed.
这篇关于在dc.js行图中隐藏指定的行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!