Skip to content

Commit

Permalink
fix: respect x2Offset for timeUnit band #8955
Browse files Browse the repository at this point in the history
  • Loading branch information
kanitw committed Jun 20, 2023
1 parent 8b1f9af commit 01d0197
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/compile/mark/encode/position-rect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,7 @@ function rectBinPosition({
const vgChannel2 = getVgPositionChannel(channel2);

const {offset} = positionOffset({channel, markDef, encoding, model, bandPosition: 0});
const {offset: offset2} = positionOffset({channel: channel2, markDef, encoding, model, bandPosition: 0});

const bandPosition = isSignalRef(bandSize)
? {signal: `(1-${bandSize.signal})/2`}
Expand All @@ -315,7 +316,7 @@ function rectBinPosition({
fieldDef,
scaleName,
bandPosition,
offset: getBinSpacing(channel2, spacing, reverse, axisTranslate, offset)
offset: getBinSpacing(channel2, spacing, reverse, axisTranslate, offset2 ?? offset)
}),
[vgChannel]: rectBinRef({
fieldDef,
Expand Down

0 comments on commit 01d0197

Please sign in to comment.