Skip to content

AxisBottom dates differ from tooltip #1067

Answered by williaster
libnine asked this question in Q&A
Discussion options

You must be logged in to vote

Hey @libnine this is because of the transform which you are applying to tick labels. In effect you've shifted them over by one bar. See here how the tick <g /> has the tick on the correct bar but the label is shifted one.

tickLabelProps accepts any TextProps from @visx/text, including angle which will rotate the text appropriately without offsetting the origin. Updated sandbox.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by libnine
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants