{"action":"created","issue":{"url":"https://api.github.com/repos/novus/nvd3/issues/983","labels_url":"https://api.github.com/repos/novus/nvd3/issues/983/labels{/name}","comments_url":"https://api.github.com/repos/novus/nvd3/issues/983/comments","events_url":"https://api.github.com/repos/novus/nvd3/issues/983/events","html_url":"https://github.com/novus/nvd3/pull/983","id":70413901,"number":983,"title":"Do not use d3.select() to make all charts work with Shadow DOM","user":{"login":"RenatoUtsch","id":836333,"avatar_url":"https://avatars.githubusercontent.com/u/836333?v=3","gravatar_id":"","url":"https://api.github.com/users/RenatoUtsch","html_url":"https://github.com/RenatoUtsch","followers_url":"https://api.github.com/users/RenatoUtsch/followers","following_url":"https://api.github.com/users/RenatoUtsch/following{/other_user}","gists_url":"https://api.github.com/users/RenatoUtsch/gists{/gist_id}","starred_url":"https://api.github.com/users/RenatoUtsch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RenatoUtsch/subscriptions","organizations_url":"https://api.github.com/users/RenatoUtsch/orgs","repos_url":"https://api.github.com/users/RenatoUtsch/repos","events_url":"https://api.github.com/users/RenatoUtsch/events{/privacy}","received_events_url":"https://api.github.com/users/RenatoUtsch/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-04-23T13:36:02Z","updated_at":"2015-05-07T19:19:53Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/novus/nvd3/pulls/983","html_url":"https://github.com/novus/nvd3/pull/983","diff_url":"https://github.com/novus/nvd3/pull/983.diff","patch_url":"https://github.com/novus/nvd3/pull/983.patch"},"body":"While working in my poly-nvd3 components that use Shadow DOM I used to have some chart features (like the circle that appears where you hover on a line on the lineChart) that didn't work. I discovered that this is because these features use d3.select(), which doesn't pierce Shadow DOM.\r\n\r\nThe thing is, if we select from the container of the chart instead of the entire document we start searching from the inside of the Shadow DOM. This works. Also, selecting from the container is faster when compared to selecting from the entire document, so it is a performance improvement.\r\n\r\nWhat do you guys think about this? It works, but maybe it can be improved. I added a new member to all nvd3 charts called 'container' that stores the chart container, so that we don't need to select it anymore (what doesn't work in Shadow DOM and is slower). Everything seems to be working and all tests passed."},"comment":{"url":"https://api.github.com/repos/novus/nvd3/issues/comments/99987347","html_url":"https://github.com/novus/nvd3/pull/983#issuecomment-99987347","issue_url":"https://api.github.com/repos/novus/nvd3/issues/983","id":99987347,"user":{"login":"RenatoUtsch","id":836333,"avatar_url":"https://avatars.githubusercontent.com/u/836333?v=3","gravatar_id":"","url":"https://api.github.com/users/RenatoUtsch","html_url":"https://github.com/RenatoUtsch","followers_url":"https://api.github.com/users/RenatoUtsch/followers","following_url":"https://api.github.com/users/RenatoUtsch/following{/other_user}","gists_url":"https://api.github.com/users/RenatoUtsch/gists{/gist_id}","starred_url":"https://api.github.com/users/RenatoUtsch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RenatoUtsch/subscriptions","organizations_url":"https://api.github.com/users/RenatoUtsch/orgs","repos_url":"https://api.github.com/users/RenatoUtsch/repos","events_url":"https://api.github.com/users/RenatoUtsch/events{/privacy}","received_events_url":"https://api.github.com/users/RenatoUtsch/received_events","type":"User","site_admin":false},"created_at":"2015-05-07T19:19:53Z","updated_at":"2015-05-07T19:19:53Z","body":"What do you think now, @liquidpele ?"}}