AxisBottom dates differ from tooltip #1067
-
Hey all - having an issue that I'm a bit stumped on. My dates are inconsistent with my tooltip. Seems to be shifted by 1. Any ideas on why this may be? Sandbox: https://codesandbox.io/s/quirky-shockley-qbjrb?file=/src/App.tsx |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hey @libnine this is because of the
|
Beta Was this translation helpful? Give feedback.
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 anyTextProps
from@visx/text
, includingangle
which will rotate the text appropriately without offsetting the origin. Updated sandbox.