I have this function to refresh my charts with Dc.Js And update the selected features on my leaflet map.
// Called when dc.js is filtered (typically from user click interaction)
var onFilt = function(chart, filter) {
updateMap(locations.top(Infinity));
};
So it filter on my bar chart in Dc.Js.
citiesChart.on("filtered", function (chart, filter) {
//console.log('11111111111');
//console.log(locations.top(Infinity));
updateMap(locations.top(Infinity));
});
dc.renderAll();
// Called when dc.js is filtered (typically from user click interaction)
var onFilt = function(chart, filter) {
console.log('fffff');
updateMap(locations.top(Infinity));
};
I also have a datable in Jquery that I want to refresh when interacting with the charts. I've tried different things to modify my variable 'var onFilt' but cant get it works.
datatable.on("filtered", function (chart, filter) {
//console.log('11111111111');
//console.log(locations.top(Infinity));
updateMap(locations.top(Infinity));
});
dc.renderAll();
// Called when dc.js is filtered (typically from user click interaction)
var RefreshTable = function(chart, filter) {
console.log('fffff');
updateMap(locations.top(Infinity));
};
});
Is there a way to modify my 'var onFilt' so it will update my the datable also?