{"action":"created","issue":{"url":"https://api.github.com/repos/i-schuetz/SwiftCharts/issues/98","repository_url":"https://api.github.com/repos/i-schuetz/SwiftCharts","labels_url":"https://api.github.com/repos/i-schuetz/SwiftCharts/issues/98/labels{/name}","comments_url":"https://api.github.com/repos/i-schuetz/SwiftCharts/issues/98/comments","events_url":"https://api.github.com/repos/i-schuetz/SwiftCharts/issues/98/events","html_url":"https://github.com/i-schuetz/SwiftCharts/issues/98","id":139118347,"number":98,"title":"weird margins when using stack view","user":{"login":"robomotic","id":315964,"avatar_url":"https://avatars.githubusercontent.com/u/315964?v=3","gravatar_id":"","url":"https://api.github.com/users/robomotic","html_url":"https://github.com/robomotic","followers_url":"https://api.github.com/users/robomotic/followers","following_url":"https://api.github.com/users/robomotic/following{/other_user}","gists_url":"https://api.github.com/users/robomotic/gists{/gist_id}","starred_url":"https://api.github.com/users/robomotic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robomotic/subscriptions","organizations_url":"https://api.github.com/users/robomotic/orgs","repos_url":"https://api.github.com/users/robomotic/repos","events_url":"https://api.github.com/users/robomotic/events{/privacy}","received_events_url":"https://api.github.com/users/robomotic/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-03-07T22:49:56Z","updated_at":"2016-03-09T23:29:59Z","closed_at":null,"body":"I am not sure about the origin of this issue but there is something rather odd happening when I use a simple StackView to plot 4 graphs in the same column.\r\nThis is how the UIViews are equally distributed \r\n![vertical stack](https://cloud.githubusercontent.com/assets/315964/13585944/4b41e59c-e4b6-11e5-99b8-0baf85bf4c5a.png)\r\n\r\nBut this happens when I plot the charts, it seems that some sort of margin is added into each drawing and no matter what fill option I use (scale to fill, aspect fit, aspect fill, redraw etc. etc.) the space is never filled accordingly.\r\n\r\n![chartsmargin](https://cloud.githubusercontent.com/assets/315964/13586020/951ee106-e4b6-11e5-8fa1-db590adb07f9.png)\r\n\r\nJust as a comparison I can put one BaseChart in the first row:\r\n![partial](https://cloud.githubusercontent.com/assets/315964/13586077/e42a92e0-e4b6-11e5-93d7-c067bdab7a93.png)\r\n\r\nIt just looks wrong!"},"comment":{"url":"https://api.github.com/repos/i-schuetz/SwiftCharts/issues/comments/194564786","html_url":"https://github.com/i-schuetz/SwiftCharts/issues/98#issuecomment-194564786","issue_url":"https://api.github.com/repos/i-schuetz/SwiftCharts/issues/98","id":194564786,"user":{"login":"i-schuetz","id":1381744,"avatar_url":"https://avatars.githubusercontent.com/u/1381744?v=3","gravatar_id":"","url":"https://api.github.com/users/i-schuetz","html_url":"https://github.com/i-schuetz","followers_url":"https://api.github.com/users/i-schuetz/followers","following_url":"https://api.github.com/users/i-schuetz/following{/other_user}","gists_url":"https://api.github.com/users/i-schuetz/gists{/gist_id}","starred_url":"https://api.github.com/users/i-schuetz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/i-schuetz/subscriptions","organizations_url":"https://api.github.com/users/i-schuetz/orgs","repos_url":"https://api.github.com/users/i-schuetz/repos","events_url":"https://api.github.com/users/i-schuetz/events{/privacy}","received_events_url":"https://api.github.com/users/i-schuetz/received_events","type":"User","site_admin":false},"created_at":"2016-03-09T23:29:59Z","updated_at":"2016-03-09T23:29:59Z","body":"Probably the frame height is not calculated at the point you initialise the chart. Please take a look at [this gist](https://gist.github.com/i-schuetz/f6e285eb0c86bb831510), which addresses some issues with autolayout. Alternatively to `viewDidLayoutSubviews` you could also use `viewDidAppear` to initialise the chart, in which you don't have to use a `didLayout` flag (since it's called only once), but this is called a bit later and can cause a noticeable delay."}}