{"action":"created","issue":{"url":"https://api.github.com/repos/dc-js/dc.js/issues/1034","labels_url":"https://api.github.com/repos/dc-js/dc.js/issues/1034/labels{/name}","comments_url":"https://api.github.com/repos/dc-js/dc.js/issues/1034/comments","events_url":"https://api.github.com/repos/dc-js/dc.js/issues/1034/events","html_url":"https://github.com/dc-js/dc.js/pull/1034","id":114510860,"number":1034,"title":"Add treemap [WIP]","user":{"login":"mtraynham","id":5741321,"avatar_url":"https://avatars.githubusercontent.com/u/5741321?v=3","gravatar_id":"","url":"https://api.github.com/users/mtraynham","html_url":"https://github.com/mtraynham","followers_url":"https://api.github.com/users/mtraynham/followers","following_url":"https://api.github.com/users/mtraynham/following{/other_user}","gists_url":"https://api.github.com/users/mtraynham/gists{/gist_id}","starred_url":"https://api.github.com/users/mtraynham/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mtraynham/subscriptions","organizations_url":"https://api.github.com/users/mtraynham/orgs","repos_url":"https://api.github.com/users/mtraynham/repos","events_url":"https://api.github.com/users/mtraynham/events{/privacy}","received_events_url":"https://api.github.com/users/mtraynham/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/dc-js/dc.js/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-11-02T02:15:09Z","updated_at":"2016-01-25T16:49:10Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/dc-js/dc.js/pulls/1034","html_url":"https://github.com/dc-js/dc.js/pull/1034","diff_url":"https://github.com/dc-js/dc.js/pull/1034.diff","patch_url":"https://github.com/dc-js/dc.js/pull/1034.patch"},"body":"This is a bit different from the other charts since it represents a hierarchy.  Most of the motivation was driven from one of [Bostock's examples](http://bost.ocks.org/mike/treemap/).  I haven't actually tried this with Crossfilter yet, so I'm not sure how it will work with the filtering...  I imagine a new filter type may have to be introduced...\r\n\r\nAnyways, the `keyAccessor` is not a single functor, but an array of functors providing the necessary keys on each datum at every level.  The `valueAccessor` and `colorAccessor` pull the metric values from each datum as normal, but respectively, there is a `sizeAggregator` and `colorAggregator` function to accumulate these leave values to each parent node.\r\n\r\nI'll provide a picture tomorrow, but it looks almost very similar to Bostock's version (I just productized it for the most part).\r\n\r\nResolves #129\r\n\r\n**TODO**\r\n- [ ] Add tests\r\n- [ ] Ensure it works with Crossfilter\r\n- [ ] Provide examples"},"comment":{"url":"https://api.github.com/repos/dc-js/dc.js/issues/comments/174577957","html_url":"https://github.com/dc-js/dc.js/pull/1034#issuecomment-174577957","issue_url":"https://api.github.com/repos/dc-js/dc.js/issues/1034","id":174577957,"user":{"login":"GunjanSh","id":16881026,"avatar_url":"https://avatars.githubusercontent.com/u/16881026?v=3","gravatar_id":"","url":"https://api.github.com/users/GunjanSh","html_url":"https://github.com/GunjanSh","followers_url":"https://api.github.com/users/GunjanSh/followers","following_url":"https://api.github.com/users/GunjanSh/following{/other_user}","gists_url":"https://api.github.com/users/GunjanSh/gists{/gist_id}","starred_url":"https://api.github.com/users/GunjanSh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GunjanSh/subscriptions","organizations_url":"https://api.github.com/users/GunjanSh/orgs","repos_url":"https://api.github.com/users/GunjanSh/repos","events_url":"https://api.github.com/users/GunjanSh/events{/privacy}","received_events_url":"https://api.github.com/users/GunjanSh/received_events","type":"User","site_admin":false},"created_at":"2016-01-25T16:49:09Z","updated_at":"2016-01-25T16:49:09Z","body":"Is it possible for you to share a sample json that can be used to create this nested treemap.\r\nOr an example please."}}