codesuki / react-d3-components

D3 Components for React
http://codesuki.github.io/react-d3-components/example.html
MIT License
1.63k stars 205 forks source link

Fix placement of axis label when axis' orientation is on the right. #102

Closed serveace closed 8 years ago

serveace commented 8 years ago

If the axis is on the right, the label ends up on top of the tick marks. With this check, it'll move it .75em in the appropriate direction. Built and test on my local environment and it looks good.

codesuki commented 8 years ago

Hey there! Thanks for the pullreq and sorry for the late response. Was on holiday. I checked your change and thought that changing it to -1.25em looks even better. What do you think? Will you give it a try and send another commit or should I just merge your pullreq. and amend the number?

codesuki commented 8 years ago

BTW I noticed putting the Y axis on the right side makes the X axis label hug the Y axis which seems weird. Don't have time to change it now but allowing to move the label right or left could be good.

serveace commented 8 years ago

-1.25em looks good. PR updated.

codesuki commented 8 years ago

Great! thank you :)