Created
November 8, 2013 05:23
-
-
Save noahpryor/7366628 to your computer and use it in GitHub Desktop.
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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta name="description" content="angularjs dc crossfilter" /> | |
| <title>JS Bin</title> | |
| </head> | |
| <body> | |
| <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"></script> | |
| <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.0.7/angular.min.js"></script> | |
| <meta charset=utf-8 /> | |
| <script src="https://rawgithub.com/square/crossfilter/master/crossfilter.min.js"></script> | |
| <script src="http://d3js.org/d3.v3.min.js"></script> | |
| <script src="https://rawgithub.com/NickQiZhu/dc.js/master/dc.min.js"></script> | |
| <link rel="https://rawgithub.com/NickQiZhu/dc.js/master/dc.css" style="text/stylesheet"> | |
| <div id="fund-data-table"> | |
| </div> | |
| <div id="data-count"> | |
| <span class="filter-count"></span><br><br><br> | |
| <class="total-count"></span> <br>records | |
| </div> | |
| </body> | |
| </html> |
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
| var funds_url = "https://rawgithub.com/noahpryor/real-startup-jobs/master/public/index.json"; | |
| d3.json(funds_url,function(data){ | |
| ///var dataTable = dc.dataTable("#fund-data-table"); | |
| fund_data = data.funds; | |
| var ndx = crossfilter([]); | |
| ndx.add(fund_data); | |
| var all = ndx.groupAll(); | |
| dc.dataCount("#data-count") | |
| .dimension(ndx) // set dimension to all data | |
| .group(all); // set group to ndx.groupAll() | |
| dc.renderAll(); | |
| }); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment