{"action":"created","issue":{"url":"https://api.github.com/repos/FormidableLabs/victory-chart/issues/255","repository_url":"https://api.github.com/repos/FormidableLabs/victory-chart","labels_url":"https://api.github.com/repos/FormidableLabs/victory-chart/issues/255/labels{/name}","comments_url":"https://api.github.com/repos/FormidableLabs/victory-chart/issues/255/comments","events_url":"https://api.github.com/repos/FormidableLabs/victory-chart/issues/255/events","html_url":"https://github.com/FormidableLabs/victory-chart/issues/255","id":161723535,"number":255,"title":"reusable Axis component","user":{"login":"itajaja","id":697647,"avatar_url":"https://avatars.githubusercontent.com/u/697647?v=3","gravatar_id":"","url":"https://api.github.com/users/itajaja","html_url":"https://github.com/itajaja","followers_url":"https://api.github.com/users/itajaja/followers","following_url":"https://api.github.com/users/itajaja/following{/other_user}","gists_url":"https://api.github.com/users/itajaja/gists{/gist_id}","starred_url":"https://api.github.com/users/itajaja/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/itajaja/subscriptions","organizations_url":"https://api.github.com/users/itajaja/orgs","repos_url":"https://api.github.com/users/itajaja/repos","events_url":"https://api.github.com/users/itajaja/events{/privacy}","received_events_url":"https://api.github.com/users/itajaja/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-06-22T16:07:48Z","updated_at":"2016-06-22T18:06:07Z","closed_at":null,"body":"if I want to write a custom Axis Component, I woul'd usually do something like this (this is a simplified example):\r\n\r\n```js\r\n// victory requires axis to be a function\r\n/* eslint-disable react/prefer-stateless-function */\r\nclass RunChartAxis extends React.Component {\r\n/* eslint-enable */\r\n  render() {\r\n    return (\r\n      <VictoryAxis {...this.props} style={{ axis: { stroke: 'black' } }} />\r\n    );\r\n  }\r\n}\r\n```\r\n\r\nThis doesn't quite work, because\r\n\r\n> Warning: Failed propType: `scale` in `VictoryAxis` must be a d3 scale. Check the render method of `RunChartAxis`\r\n\r\nthe result is that the Axis is not displayed as I would expect in many regards.\r\n\r\nWhat is the best way to extend the base VictoryAxis component?"},"comment":{"url":"https://api.github.com/repos/FormidableLabs/victory-chart/issues/comments/227828319","html_url":"https://github.com/FormidableLabs/victory-chart/issues/255#issuecomment-227828319","issue_url":"https://api.github.com/repos/FormidableLabs/victory-chart/issues/255","id":227828319,"user":{"login":"boygirl","id":3719995,"avatar_url":"https://avatars.githubusercontent.com/u/3719995?v=3","gravatar_id":"","url":"https://api.github.com/users/boygirl","html_url":"https://github.com/boygirl","followers_url":"https://api.github.com/users/boygirl/followers","following_url":"https://api.github.com/users/boygirl/following{/other_user}","gists_url":"https://api.github.com/users/boygirl/gists{/gist_id}","starred_url":"https://api.github.com/users/boygirl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/boygirl/subscriptions","organizations_url":"https://api.github.com/users/boygirl/orgs","repos_url":"https://api.github.com/users/boygirl/repos","events_url":"https://api.github.com/users/boygirl/events{/privacy}","received_events_url":"https://api.github.com/users/boygirl/received_events","type":"User","site_admin":false},"created_at":"2016-06-22T18:06:07Z","updated_at":"2016-06-22T18:06:07Z","body":"@itajaja what you've done above should work unless `{...this.props}` is including a scale prop of its own, since `VictoryAxis` has a default scale prop. If you want to extend though, you might try something like \r\n```\r\nimport { VictoryAxis } from \"victory-axis/src\";\r\n\r\nexport default class extends VictoryAxis {\r\n  \r\n  render() {\r\n    ...\r\n  }\r\n}\r\n```\r\n"}}
{"actor":{"display_login":"boygirl"}}