{"action":"created","issue":{"url":"https://api.github.com/repos/dc-js/dc.js/issues/841","labels_url":"https://api.github.com/repos/dc-js/dc.js/issues/841/labels{/name}","comments_url":"https://api.github.com/repos/dc-js/dc.js/issues/841/comments","events_url":"https://api.github.com/repos/dc-js/dc.js/issues/841/events","html_url":"https://github.com/dc-js/dc.js/issues/841","id":54827007,"number":841,"title":"check the selector supplied to chart constructor","user":{"login":"gordonwoodhull","id":1366709,"avatar_url":"https://avatars.githubusercontent.com/u/1366709?v=3","gravatar_id":"","url":"https://api.github.com/users/gordonwoodhull","html_url":"https://github.com/gordonwoodhull","followers_url":"https://api.github.com/users/gordonwoodhull/followers","following_url":"https://api.github.com/users/gordonwoodhull/following{/other_user}","gists_url":"https://api.github.com/users/gordonwoodhull/gists{/gist_id}","starred_url":"https://api.github.com/users/gordonwoodhull/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gordonwoodhull/subscriptions","organizations_url":"https://api.github.com/users/gordonwoodhull/orgs","repos_url":"https://api.github.com/users/gordonwoodhull/repos","events_url":"https://api.github.com/users/gordonwoodhull/events{/privacy}","received_events_url":"https://api.github.com/users/gordonwoodhull/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":{"url":"https://api.github.com/repos/dc-js/dc.js/milestones/13","labels_url":"https://api.github.com/repos/dc-js/dc.js/milestones/13/labels","id":416264,"number":13,"title":"v2.0","description":"","creator":{"login":"jrideout","id":197338,"avatar_url":"https://avatars.githubusercontent.com/u/197338?v=3","gravatar_id":"","url":"https://api.github.com/users/jrideout","html_url":"https://github.com/jrideout","followers_url":"https://api.github.com/users/jrideout/followers","following_url":"https://api.github.com/users/jrideout/following{/other_user}","gists_url":"https://api.github.com/users/jrideout/gists{/gist_id}","starred_url":"https://api.github.com/users/jrideout/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jrideout/subscriptions","organizations_url":"https://api.github.com/users/jrideout/orgs","repos_url":"https://api.github.com/users/jrideout/repos","events_url":"https://api.github.com/users/jrideout/events{/privacy}","received_events_url":"https://api.github.com/users/jrideout/received_events","type":"User","site_admin":false},"open_issues":81,"closed_issues":183,"state":"open","created_at":"2013-08-31T17:39:57Z","updated_at":"2015-01-20T21:50:14Z","due_on":null,"closed_at":null},"comments":1,"created_at":"2015-01-19T23:53:28Z","updated_at":"2015-01-28T02:16:08Z","closed_at":null,"body":"A rookie mistake is to supply a nonsense selector to the chart constructor, e.g. leaving off the hash for an id-selector as in this SO question:\r\n\r\nhttp://stackoverflow.com/questions/28021337/crossfilter-reduce-average-mean-display-on-bar-chart-p-value-and-p-key\r\n\r\nI think when creating the root SVG we can check that it actually worked, because there is no valid reason for it not to work."},"comment":{"url":"https://api.github.com/repos/dc-js/dc.js/issues/comments/71769453","html_url":"https://github.com/dc-js/dc.js/issues/841#issuecomment-71769453","issue_url":"https://api.github.com/repos/dc-js/dc.js/issues/841","id":71769453,"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},"created_at":"2015-01-28T02:16:08Z","updated_at":"2015-01-28T02:16:08Z","body":"How about throwing an error when this occurs?  When you try to anchor the chart, if you select the root and the selection was empty, we should throw an error."}}