Skip to content

Commit aaa44e6

Browse files
committed
fix tests
1 parent 98dd563 commit aaa44e6

File tree

4 files changed

+18
-35
lines changed

4 files changed

+18
-35
lines changed

test/output/penguinFacetAnnotated.svg

+3-3
Loading

test/output/penguinFacetAnnotatedX.svg

+3-3
Loading

test/plots/penguins-facet-annotated-x.js

+7-15
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,13 @@ export default async function () {
88
x: {insetRight: 10},
99
marks: [
1010
Plot.frame(),
11-
Plot.barX(
12-
penguins,
13-
Plot.groupY(
14-
{x: "count"},
15-
{
16-
y: "species",
17-
fill: "sex",
18-
fx: "island"
19-
}
20-
)
21-
),
22-
Plot.text(["Torgersen Island\nonly has\nAdelie\npenguins!"], {
23-
frameAnchor: "right",
24-
dx: -10,
25-
fx: ["Torgersen"]
11+
Plot.barX(penguins, Plot.groupY({x: "count"}, {fx: "island", y: "species", fill: "sex"})),
12+
Plot.text(["Torgersen Island only has Adelie penguins!"], {
13+
fx: ["Torgersen"],
14+
frameAnchor: "top-right",
15+
dy: 4,
16+
dx: -4,
17+
lineWidth: 10
2618
})
2719
]
2820
});

test/plots/penguins-facet-annotated.js

+5-14
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,12 @@ export default async function () {
1010
facet: {marginRight: 70},
1111
marks: [
1212
Plot.frame(),
13-
Plot.barX(
14-
penguins,
15-
Plot.groupY(
16-
{x: "count"},
17-
{
18-
y: "species",
19-
fill: "sex",
20-
fy: "island"
21-
}
22-
)
23-
),
24-
Plot.text(["↞ Torgersen Island only has Adelie penguins!"], {
13+
Plot.barX(penguins, Plot.groupY({x: "count"}, {fy: "island", y: "species", fill: "sex"})),
14+
Plot.text(["Torgersen Island only has Adelie penguins!"], {
15+
fy: ["Torgersen"],
2516
frameAnchor: "top-right",
26-
dx: -10,
27-
fy: ["Torgersen"]
17+
dy: 4,
18+
dx: -4
2819
})
2920
]
3021
});

0 commit comments

Comments
 (0)