Replies: 1 comment 1 reply
-
|
The binX transform produces x1 and x2 representing the x-extent of the bin. A mark that only needs a single x-position typically uses the implicit x output of the bin transform, which is the middle of x1 and x2. But I think the tip mark might consume x1 and x2 itself, unlike the dot mark, hence the difference in behavior. I’d need to investigate further to say for sure but I suspect that is the reason. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello ObservableHq Plot community,
Good Day!
Question
Is this a known issue? Can
x.intervalandPlot.tipcoexist with correct positioning, or am I misconfiguring something? Using,x.intervalis a must requirement for my use case.Problem
When using
x.interval(e.g., "day") alongsidePlot.tipwithPlot.binX, the tooltip appears at an incorrect position, offset from the data point. Removingx.intervalfixes the positioning.Reproduction Code
x.interval).code
image
Working (without
x.interval):Plot.tip().code
image
Workaround
Plot.binXworks withx.interval, but loses the flexibility of separatePlot.tip:code
image
Sample Data
Thanks in advance.
Beta Was this translation helpful? Give feedback.
All reactions