I used the idea developed by Jeno and Gordon at dc.js multiple select menu with checkboxes , Specifically dc.js multiple select menu with checkboxes.
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"})
});
The problem I have is that every time I use dc.renderAll() (in a reset All button and when the page size changes) the same multiselect button is copied, cloned next to the button and so on depending on how many times Enable renderAll (). Additionally, the menu is not updated if a filter is applied to a chart.
Can you think of a solution?
Thank