Skip to content

Commit fd08c0c

Browse files
committed
fix zero-dimensional rule position
1 parent c2c3dac commit fd08c0c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/marks/rule.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export class RuleX extends Mark {
4242
if (Z) index.sort((i, j) => ascending(Z[i], Z[j]));
4343
return create("svg:g")
4444
.call(applyIndirectStyles, this)
45-
.call(applyTransform, x, false, 0.5, 0)
45+
.call(applyTransform, X && x, false, 0.5, 0)
4646
.call(g => g.selectAll("line")
4747
.data(index)
4848
.join("line")
@@ -95,7 +95,7 @@ export class RuleY extends Mark {
9595
if (Z) index.sort((i, j) => ascending(Z[i], Z[j]));
9696
return create("svg:g")
9797
.call(applyIndirectStyles, this)
98-
.call(applyTransform, false, y, 0, 0.5)
98+
.call(applyTransform, false, Y && y, 0, 0.5)
9999
.call(g => g.selectAll("line")
100100
.data(index)
101101
.join("line")

0 commit comments

Comments
 (0)