问题
I have seen most of the examples of dc.js which filters the data using brushes. How should i filter the data using the row element selected from datatable??
I am not sure of exact solution but some workaround may be done as
dimension.filter(value)
where value updated onclick? Am I going in right direction or is there a better way?
Edit 1 If i draw a row chart of the same thing with the then I don't have to handle onlcick event or anything but for datatable why is it comparatively so much complecated?
回答1:
That should work. You will have to trigger the redraw events to the charts know about the change.
回答2:
yes I put a onclick="function(value)" button.
and
window.function(value){
table.dimension(dimension);
table.filter(value);
table.render();
}
PS: I am not proficient in dc.js so this method might not be a optimal solution
来源:https://stackoverflow.com/questions/19384104/how-to-filter-data-in-dcjs-crossfilter-on-selection-of-datatable-row