-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add filtering information to the data table #697
Conversation
This info is stored in a CSS class .selected or .deselected
Okay, I'm confused. This looks like a good idea, but I tried testing it, crossfilter's
https://github.com/square/crossfilter/wiki/API-Reference#dimension_top https://github.com/square/crossfilter/blob/master/src/crossfilter.js#L309 Given this, how are you using this mod? |
Here's what we are doing with our modified version of dc.js: |
That's impressive! I only poked around for a little while but it looks like you are using the 'trick' of passing a group as a dimension to the dataTable? I guess this is one of those cases that works sort of by accident because of the loose coupling between dc.js and crossfilter. We don't have a test for it yet. I guess it wouldn't work if there were built-in support for filtering on tables, because groups have no Perhaps this case should be officially supported. |
Ok, I see what you mean. And you're right we are lucky it works. We have a function listening for filtering events on the charts in order to synchronize the charts of the same dimension. So when we filter on the table, the filter is also applied to the other charts of the same dimension (at least one wordcloud), and so the crossfilter dimension is also filtered. So yeah, it wouldn't work in dc where this synchronization behavior between charts of the same dimension does not exists. |
Ah, that is great to hear, thank you. I am planning to implement something much like that because currently filtering on composite charts does not work right, since the chart gets out of sync with itself. It's the only feature I plan to implement for 2.0; the rest are (a lot of!) bug fixes and reviewing these PRs. It is very interesting that the feature in this PR works by the combination of the "group-table trick" and by linking to another chart which actually does the filtering on its own reference to the dimension. I will think on this some more and schedule this PR for 2.1. Although I'm pretty sure it is safe now, I just want to think it through... And see if I can learn anything else from your "linking" implementation, if you don't mind. Thanks again. |
I think this will be relevant with the fix for #681 and a constellation of other problems which is in the sync-filter branch. Linking this to those to merge at the same time, and add a test for the group-as-dimension trick that makes this one work. |
http://loganalysis.github.io/analytics-js/ is down. |
@vmantese ah, sorry, the url changed, use this one: |
@npmiller Beautiful. |
Can we close this? |
Sure |
Add the information if a line of the table is filtered or not. This info is stored in a CSS class .selected or .deselected. This allows us to display filtered data on the table as well.