{"action":"created","issue":{"url":"https://api.github.com/repos/dc-js/dc.js/issues/1126","repository_url":"https://api.github.com/repos/dc-js/dc.js","labels_url":"https://api.github.com/repos/dc-js/dc.js/issues/1126/labels{/name}","comments_url":"https://api.github.com/repos/dc-js/dc.js/issues/1126/comments","events_url":"https://api.github.com/repos/dc-js/dc.js/issues/1126/events","html_url":"https://github.com/dc-js/dc.js/issues/1126","id":147570163,"number":1126,"title":"How do charts know how to update themselves?","user":{"login":"lmatteis","id":535442,"avatar_url":"https://avatars.githubusercontent.com/u/535442?v=3","gravatar_id":"","url":"https://api.github.com/users/lmatteis","html_url":"https://github.com/lmatteis","followers_url":"https://api.github.com/users/lmatteis/followers","following_url":"https://api.github.com/users/lmatteis/following{/other_user}","gists_url":"https://api.github.com/users/lmatteis/gists{/gist_id}","starred_url":"https://api.github.com/users/lmatteis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lmatteis/subscriptions","organizations_url":"https://api.github.com/users/lmatteis/orgs","repos_url":"https://api.github.com/users/lmatteis/repos","events_url":"https://api.github.com/users/lmatteis/events{/privacy}","received_events_url":"https://api.github.com/users/lmatteis/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-04-11T22:11:07Z","updated_at":"2016-04-11T23:16:37Z","closed_at":null,"body":"Let's say I have a chart with a specific dimension and group, such as:\r\n\r\n```\r\nvar gender = xf.dimension(function (d) { return d.gender; }),\r\n    genders = gender.group().reduceSum(function (d) { return d.interactions; })\r\n```\r\n\r\nThen I have another chart, which when interacted with (perhaps a pie chart click), it alters the first chart. How does the first chart know that it needs to update based on the value click on the pie chart? I'd imagine it must somehow know about the `interactions` property in order to rerun the reduce function such as:\r\n\r\n```\r\n// this runs inside the chart\r\ngroup = group.reduceSum(function (d) {\r\n  if (d.key == valueClicked) return d.interactions;\r\n  else return 0;\r\n})\r\n```\r\n\r\nDo interactions in DC.js actually involve rerunning the reduce functions or does it do it in some other way?"},"comment":{"url":"https://api.github.com/repos/dc-js/dc.js/issues/comments/208610188","html_url":"https://github.com/dc-js/dc.js/issues/1126#issuecomment-208610188","issue_url":"https://api.github.com/repos/dc-js/dc.js/issues/1126","id":208610188,"user":{"login":"lmatteis","id":535442,"avatar_url":"https://avatars.githubusercontent.com/u/535442?v=3","gravatar_id":"","url":"https://api.github.com/users/lmatteis","html_url":"https://github.com/lmatteis","followers_url":"https://api.github.com/users/lmatteis/followers","following_url":"https://api.github.com/users/lmatteis/following{/other_user}","gists_url":"https://api.github.com/users/lmatteis/gists{/gist_id}","starred_url":"https://api.github.com/users/lmatteis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lmatteis/subscriptions","organizations_url":"https://api.github.com/users/lmatteis/orgs","repos_url":"https://api.github.com/users/lmatteis/repos","events_url":"https://api.github.com/users/lmatteis/events{/privacy}","received_events_url":"https://api.github.com/users/lmatteis/received_events","type":"User","site_admin":false},"created_at":"2016-04-11T23:16:37Z","updated_at":"2016-04-11T23:16:37Z","body":"I did not know that calling `dimension.filter()` for one dimension would also change other groups! Wish this was better documented on crossfilter's site!!"}}