{"action":"closed","issue":{"url":"https://api.github.com/repos/JesperLekland/react-native-svg-charts/issues/172","repository_url":"https://api.github.com/repos/JesperLekland/react-native-svg-charts","labels_url":"https://api.github.com/repos/JesperLekland/react-native-svg-charts/issues/172/labels{/name}","comments_url":"https://api.github.com/repos/JesperLekland/react-native-svg-charts/issues/172/comments","events_url":"https://api.github.com/repos/JesperLekland/react-native-svg-charts/issues/172/events","html_url":"https://github.com/JesperLekland/react-native-svg-charts/issues/172","id":333347708,"node_id":"MDU6SXNzdWUzMzMzNDc3MDg=","number":172,"title":"Line chart with x axis not working when wrapped in horizontal ScrollView","user":{"login":"jfr3000","id":9396227,"node_id":"MDQ6VXNlcjkzOTYyMjc=","avatar_url":"https://avatars3.githubusercontent.com/u/9396227?v=4","gravatar_id":"","url":"https://api.github.com/users/jfr3000","html_url":"https://github.com/jfr3000","followers_url":"https://api.github.com/users/jfr3000/followers","following_url":"https://api.github.com/users/jfr3000/following{/other_user}","gists_url":"https://api.github.com/users/jfr3000/gists{/gist_id}","starred_url":"https://api.github.com/users/jfr3000/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jfr3000/subscriptions","organizations_url":"https://api.github.com/users/jfr3000/orgs","repos_url":"https://api.github.com/users/jfr3000/repos","events_url":"https://api.github.com/users/jfr3000/events{/privacy}","received_events_url":"https://api.github.com/users/jfr3000/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-06-18T16:35:53Z","updated_at":"2018-06-18T16:39:23Z","closed_at":"2018-06-18T16:39:23Z","author_association":"NONE","body":"### What is the problem?\r\nA line chart with an x axis doesn't render properly when wrapped in a horizontal scroll view.\r\n\r\n### When does it happen?\r\nI used [this example](https://github.com/JesperLekland/react-native-svg-charts#xaxis) - it was working fine. I wrapped a `ScrollView` around it - still good. I added `horizontal={true}` to the `ScrollView` - the chart breaks.\r\n\r\n### What platform?\r\n* [ ] iOS <!-- specific os version ? -->\r\n* [x] Android <!-- specific os version ? -->\r\n\r\nReact Native version: 0.55.4\r\n\r\n### Code to reproduce\r\n\r\n```javascript\r\nimport React from 'react'\r\nimport { LineChart, XAxis, Grid } from 'react-native-svg-charts'\r\nimport { ScrollView, View } from 'react-native'\r\n\r\nexport default class XAxisExample extends React.PureComponent {\r\n\r\n  render() {\r\n\r\n    const data = [50, 10, 40, 95, -4, -24, 85, 91, 35, 53, -53, 24, 50, -20, -80]\r\n\r\n    return (\r\n      <ScrollView horizontal={true}>\r\n        <View style={{ height: 200, padding: 20 }}>\r\n          <LineChart\r\n            style={{ flex: 1 }}\r\n            data={data}\r\n            gridMin={0}\r\n            contentInset={{ top: 10, bottom: 10 }}\r\n            svg={{ stroke: 'rgb(134, 65, 244)' }}\r\n          >\r\n            <Grid />\r\n          </LineChart>\r\n          <XAxis\r\n            style={{ marginHorizontal: -10 }}\r\n            data={data}\r\n            formatLabel={(value, index) => index}\r\n            contentInset={{ left: 10, right: 10 }}\r\n            svg={{ fontSize: 10, fill: 'black' }}\r\n          />\r\n        </View>\r\n      </ScrollView>\r\n    )\r\n  }\r\n}\r\n```\r\n"}}
{"actor":{"display_login":"jfr3000"}}