Skip to content

Commit fd73d41

Browse files
committed
apply offset on the line
1 parent 1a89bb1 commit fd73d41

File tree

8 files changed

+402
-334
lines changed

8 files changed

+402
-334
lines changed

src/marks/area.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ import {
88
applyIndirectStyles,
99
applyTransform,
1010
applyGroupedChannelStyles,
11-
groupIndex
11+
groupIndex,
12+
offset
1213
} from "../style.js";
1314
import {maybeDenseIntervalX, maybeDenseIntervalY} from "../transforms/bin.js";
1415
import {maybeIdentityX, maybeIdentityY} from "../transforms/identity.js";
@@ -71,10 +72,12 @@ export class Area extends Mark {
7172
);
7273
if (this.line) {
7374
area.attr("stroke", "none");
74-
enter.append("path")
75+
enter
76+
.append("path")
7577
.call(applyDirectStyles, this)
7678
.call(applyGroupedChannelStyles, this, channels)
7779
.attr("fill", "none")
80+
.attr("transform", offset ? `translate(${offset},${offset})` : null)
7881
.attr(
7982
"d",
8083
shapeLine()

test/output/aaplClose.svg

Lines changed: 42 additions & 42 deletions
Loading

test/output/aaplCloseClip.svg

Lines changed: 56 additions & 58 deletions
Loading

test/output/aaplCloseLine.svg

Lines changed: 39 additions & 39 deletions
Loading

test/output/availability.svg

Lines changed: 5 additions & 5 deletions
Loading

test/output/downloads.svg

Lines changed: 5 additions & 5 deletions
Loading

0 commit comments

Comments
 (0)