1
我使用了由Jeno和Gordon在dc.js multiple select menu with checkboxes开发的想法,特别是dc.js带有复选框的多选菜单。多重选择按钮每次重复使用dc.renderAll
selectField.on('postRender', function() {
$('#menuselect select').change(function(){
console.log($(this).val())
if ($(this).val() && $(this).val() != "") {
selectField.replaceFilter([$(this).val()]);
} else {
selectField.filterAll();
}
dc.events.trigger(function() {
dc.redrawAll();
});
}).multipleSelect({ placeholder: "Select Country"})
});
我的问题是,每次我用dc.renderAll()(在复位所有按钮,并在页面大小的变化)一样多选按钮被复制,旁边的按钮等克隆取决于启用renderAll()多少次。 此外,如果将过滤器应用于图表,则菜单不会更新。
你能想出一个解决方案吗?
感谢
非常感谢。 – ajey2987
肯定的事!如果你制定出没有回归的组合解决方案,也许你可以在某处发布代码。我相信它会帮助别人。 – Gordon