{"action":"created","issue":{"url":"https://api.github.com/repos/ScottLogic/d3fc/issues/996","repository_url":"https://api.github.com/repos/ScottLogic/d3fc","labels_url":"https://api.github.com/repos/ScottLogic/d3fc/issues/996/labels{/name}","comments_url":"https://api.github.com/repos/ScottLogic/d3fc/issues/996/comments","events_url":"https://api.github.com/repos/ScottLogic/d3fc/issues/996/events","html_url":"https://github.com/ScottLogic/d3fc/issues/996","id":161472902,"number":996,"title":"How to Set Layout Size for Cartesian Chart?","user":{"login":"joncursi","id":4974609,"avatar_url":"https://avatars.githubusercontent.com/u/4974609?v=3","gravatar_id":"","url":"https://api.github.com/users/joncursi","html_url":"https://github.com/joncursi","followers_url":"https://api.github.com/users/joncursi/followers","following_url":"https://api.github.com/users/joncursi/following{/other_user}","gists_url":"https://api.github.com/users/joncursi/gists{/gist_id}","starred_url":"https://api.github.com/users/joncursi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joncursi/subscriptions","organizations_url":"https://api.github.com/users/joncursi/orgs","repos_url":"https://api.github.com/users/joncursi/repos","events_url":"https://api.github.com/users/joncursi/events{/privacy}","received_events_url":"https://api.github.com/users/joncursi/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-06-21T15:48:34Z","updated_at":"2016-06-21T16:23:52Z","closed_at":null,"body":"Based on the documentation, it is unclear to me on how to properly set the layout dimensions of a cartesian chart using the cartesian API.\r\n\r\nWhen I set the height and width attributes on the top-most DOM node (a div that wraps the chart), this div will take on the proper dimensions, however the `.cartesian-chart` element that gets rendered as a child within it calculates its own width and height dimensions which appear to be driven off of `layout-width` and `layout-height`. How can these values be customized at the time of render? I currently have:\r\n\r\n```js\r\n...\r\n\r\nconst chart = fc.chart.cartesian(\r\n  xScale,\r\n  yScale)\r\n  .plotArea(plotArea);\r\n\r\nd3.select('#price-chart') // top-level div DOM node\r\n      .attr({\r\n        height: chartHeight,\r\n        width: chartWidth,\r\n      })\r\n      .datum(chartData)\r\n      .call(chart);\r\n```\r\n\r\n`#price-chart` renders at 418x208\r\n`.cartesian-chart` child renders only at 354x208, I would like it's width to be 100% (418px in this case)\r\n\r\nThanks!"},"comment":{"url":"https://api.github.com/repos/ScottLogic/d3fc/issues/comments/227493842","html_url":"https://github.com/ScottLogic/d3fc/issues/996#issuecomment-227493842","issue_url":"https://api.github.com/repos/ScottLogic/d3fc/issues/996","id":227493842,"user":{"login":"joncursi","id":4974609,"avatar_url":"https://avatars.githubusercontent.com/u/4974609?v=3","gravatar_id":"","url":"https://api.github.com/users/joncursi","html_url":"https://github.com/joncursi","followers_url":"https://api.github.com/users/joncursi/followers","following_url":"https://api.github.com/users/joncursi/following{/other_user}","gists_url":"https://api.github.com/users/joncursi/gists{/gist_id}","starred_url":"https://api.github.com/users/joncursi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joncursi/subscriptions","organizations_url":"https://api.github.com/users/joncursi/orgs","repos_url":"https://api.github.com/users/joncursi/repos","events_url":"https://api.github.com/users/joncursi/events{/privacy}","received_events_url":"https://api.github.com/users/joncursi/received_events","type":"User","site_admin":false},"created_at":"2016-06-21T16:23:52Z","updated_at":"2016-06-21T16:23:52Z","body":"Here's a screengrab of the DOM nodes:\r\n\r\n![screen_shot_2016-06-21_at_12_22_07_pm](https://cloud.githubusercontent.com/assets/4974609/16237530/ea4862b4-37aa-11e6-9e31-8aad45faea07.png)\r\n\r\n`.cartesian-chart` does not inherit its size from the parent, it appears it needs to be specified separately, which I'm unsure how to do. Thanks!"}}
{"actor":{"display_login":"joncursi"}}