{"action":"created","issue":{"url":"https://api.github.com/repos/krispo/angular-nvd3/issues/40","labels_url":"https://api.github.com/repos/krispo/angular-nvd3/issues/40/labels{/name}","comments_url":"https://api.github.com/repos/krispo/angular-nvd3/issues/40/comments","events_url":"https://api.github.com/repos/krispo/angular-nvd3/issues/40/events","html_url":"https://github.com/krispo/angular-nvd3/issues/40","id":43723470,"number":40,"title":"How to size chart based on container?","user":{"login":"pvogel1967","id":1844599,"avatar_url":"https://avatars.githubusercontent.com/u/1844599?v=3","gravatar_id":"","url":"https://api.github.com/users/pvogel1967","html_url":"https://github.com/pvogel1967","followers_url":"https://api.github.com/users/pvogel1967/followers","following_url":"https://api.github.com/users/pvogel1967/following{/other_user}","gists_url":"https://api.github.com/users/pvogel1967/gists{/gist_id}","starred_url":"https://api.github.com/users/pvogel1967/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pvogel1967/subscriptions","organizations_url":"https://api.github.com/users/pvogel1967/orgs","repos_url":"https://api.github.com/users/pvogel1967/repos","events_url":"https://api.github.com/users/pvogel1967/events{/privacy}","received_events_url":"https://api.github.com/users/pvogel1967/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":26,"created_at":"2014-09-24T06:31:19Z","updated_at":"2015-11-16T06:59:48Z","closed_at":null,"body":"I've got several charts that get displayed in various Bootstrap panels, I would like to size the chart to fit in the dynamically-sized + positioned panel.  I'm going nuts trying to make that happen.  Naturally, my controller which sets up the options for the chart knows nothing about the DOM, so I can't get it to lookup the size of the parent div.  I tried updating angular-nvd3.js in the directive to set scope.options.chart.width based on element[0].parentElement.clientWidth, but that seems to be overwritten by something by the time we hit updateWithData, so I tried hard-coding it in the updateWithData function on both the svg width attr set and the svg style width, but the chart still winds up being 1/2 the width it should be!  Where am I going wrong?"},"comment":{"url":"https://api.github.com/repos/krispo/angular-nvd3/issues/comments/156941087","html_url":"https://github.com/krispo/angular-nvd3/issues/40#issuecomment-156941087","issue_url":"https://api.github.com/repos/krispo/angular-nvd3/issues/40","id":156941087,"user":{"login":"exp-ajeesh","id":5848395,"avatar_url":"https://avatars.githubusercontent.com/u/5848395?v=3","gravatar_id":"","url":"https://api.github.com/users/exp-ajeesh","html_url":"https://github.com/exp-ajeesh","followers_url":"https://api.github.com/users/exp-ajeesh/followers","following_url":"https://api.github.com/users/exp-ajeesh/following{/other_user}","gists_url":"https://api.github.com/users/exp-ajeesh/gists{/gist_id}","starred_url":"https://api.github.com/users/exp-ajeesh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/exp-ajeesh/subscriptions","organizations_url":"https://api.github.com/users/exp-ajeesh/orgs","repos_url":"https://api.github.com/users/exp-ajeesh/repos","events_url":"https://api.github.com/users/exp-ajeesh/events{/privacy}","received_events_url":"https://api.github.com/users/exp-ajeesh/received_events","type":"User","site_admin":false},"created_at":"2015-11-16T06:59:48Z","updated_at":"2015-11-16T06:59:48Z","body":"Thanks...Its working fine."}}