Created
December 10, 2016 17:57
-
-
Save caspg/badf282b8ff23786893866f888a359b0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react' | |
import Axis from '../Axis' | |
export default ({ scales, margins, svgDimensions }) => { | |
const { height, width } = svgDimensions | |
const xProps = { | |
orient: 'Bottom', | |
scale: scales.xScale, | |
translate: `translate(0, ${height - margins.bottom})`, | |
tickSize: height - margins.top - margins.bottom, | |
} | |
const yProps = { | |
orient: 'Left', | |
scale: scales.yScale, | |
translate: `translate(${margins.left}, 0)`, | |
tickSize: width - margins.left - margins.right, | |
} | |
return ( | |
<g> | |
<Axis {...xProps} /> | |
<Axis {...yProps} /> | |
</g> | |
) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment