Created
January 4, 2018 01:17
-
-
Save alan-ho/c154895ffba93e9eaea6145db5a9e8b2 to your computer and use it in GitHub Desktop.
Crossfilter & dc filter printer source: codeproject
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function print_filter(filter) { | |
| var f=eval(filter); | |
| if (typeof(f.length) != "undefined") {}else{} | |
| if (typeof(f.top) != "undefined") {f=f.top(Infinity);}else{} | |
| if (typeof(f.dimension) != "undefined") {f=f.dimension(function(d) { return "";}).top(Infinity);}else{} | |
| console.log(filter+"("+f.length+") = "+JSON.stringify(f).replace("[","[\n\t").replace(/}\,/g,"},\n\t").replace("]","\n]")); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment