Closed
Description
Describe the issue
If a RectAnnotation
is defined without using a groupId
the outside
prop has no affect.
To Reproduce
Steps to reproduce the behavior:
- Go to https://codesandbox.io/p/sandbox/quizzical-saha-s8k5p2?file=%2Fsrc%2FApp.tsx%3A38%2C28
- Comment/uncomment the
groupId
on theRectAnnotation
spec - Notice the annotation is not rendered as
outside
annotation whengroupId
is missing
Expected behaviour
The RectAnnotation
is always rendered on the outside of the chart when the outside
prop is set to true
.
Version (please complete the following information):
I think this issue is original to the outside
feature added in #1207
Additional context
The code has a break branch from #842 to render annotations when we have no yScale
.
This is the path taken when a groupId
is applied. But when a yScale
is defined, it renders the outside only if x0
and x1
where initially undefined
, this is the problem!