You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The GitHub Burndown chart does something like this by converting an interval into a regular pulse (e.g., daily value). It’s not technically possible to stack rects with overlapping but non-aligned intervals because the resulting stacked shape is no longer a rect. For example, say you have two intervals represented in ASCII art:
aaaaaaaaaa
bbbb
If you were to stack a on top of b, the shape for a would no longer be a rectangle:
aaaa
aaaabbbbaa
The stack transform doesn’t require that the independent dimension (normally x) is regular, so you wouldn’t have to take the pulse approach used in the linked notebook — you could instead cut every interval when it overlaps with another interval. And then the stack transform would work. Maybe the bin transform could do something fancy here to replicate data that spans multiple bins.
mbostock
changed the title
ENH: Should be able to stack rectY and areaY even if x1 and x2 are not coincident
Stack overlapping, non-aligned intervals?
Jan 11, 2024
Currently, if two rects do not share an x1 and x2, they will not stack, it would be great if they did!
Here's an example of something i would like to stack but is not:
https://observablehq.com/@fgregg/chicago-shelter-eviction-rates@129
I manually set offsets to look like this:
https://observablehq.com/@fgregg/chicago-shelter-eviction-rates@171
The text was updated successfully, but these errors were encountered: