Skip to content

Commit 094fb3e

Browse files
committed
fixes for dark mode
1 parent bf7b99f commit 094fb3e

7 files changed

+10
-6
lines changed

test/plots/athletes-sex-weight.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ export default async function() {
88
grid: true
99
},
1010
marks: [
11+
Plot.rectY(athletes, Plot.binX({y2: "count"}, {x: "weight", fill: "white", z: "sex", thresholds: 30})),
1112
Plot.rectY(athletes, Plot.binX({y2: "count"}, {x: "weight", fill: "sex", mixBlendMode: "multiply", thresholds: 30})),
1213
Plot.ruleY([0])
1314
]

test/plots/cars-parcoords.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ export default async function() {
3636
},
3737
marks: [
3838
Plot.ruleY(dimensions),
39-
Plot.line(data, {...xy, z: "name", stroke: "#444", strokeWidth: 0.5, strokeOpacity: 0.5}),
40-
Plot.text(ticks, {...xy, fill: null, stroke: "white", strokeWidth: 3, strokeLinejoin: "round", text: "value"}),
39+
Plot.line(data, {...xy, z: "name", stroke: "currentColor", colorFilter: "invert(40%)", strokeWidth: 0.5, strokeOpacity: 0.5}),
40+
Plot.text(ticks, {...xy, fill: null, stroke: "currentColor", colorFilter: "invert(1)",strokeWidth: 3, strokeLinejoin: "round", text: "value"}),
4141
Plot.text(ticks, {...xy, text: "value"})
4242
]
4343
});

test/plots/metro-unemployment-ridgeline.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export default async function() {
2020
marginLeft: 300
2121
},
2222
marks: [
23-
Plot.areaY(data, {x: "date", y: "unemployment", fill: "#eee"}),
23+
Plot.areaY(data, {x: "date", y: "unemployment", fill: "currentColor", colorFilter: "invert(72%) brightness(130%)"}),
2424
Plot.line(data, {x: "date", y: "unemployment"}),
2525
Plot.ruleY([0])
2626
]

test/plots/penguin-culmen-array.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ export default async function() {
1919
x: culmen_depth_mm,
2020
y: culmen_length_mm,
2121
r: 2,
22-
fill: "#ddd"
22+
fill: "currentColor",
23+
colorFilter: "invert(0.75) brightness(1.1)"
2324
}),
2425
Plot.dot(data, {
2526
x: culmen_depth_mm,

test/plots/penguin-culmen.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ export default async function() {
1818
x: "culmen_depth_mm",
1919
y: "culmen_length_mm",
2020
r: 2,
21-
fill: "#ddd"
21+
fill: "currentColor",
22+
colorFilter: "invert(0.75) brightness(1.1)"
2223
}),
2324
Plot.dot(data, {
2425
x: "culmen_depth_mm",

test/plots/simpsons-ratings.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ export default async function() {
2727
x: "number_in_season",
2828
y: "season",
2929
text: d => d.imdb_rating == null ? null : d.imdb_rating.toFixed(1),
30+
fill: "black",
3031
title: "title"
3132
})
3233
]

test/plots/us-presidential-election-2020.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ ${[["Trump", d.results_trumpd], ["Biden", d.results_bidenj]]
3535
.sort(([, a], [, b]) => d3.descending(a, b))
3636
.map(([name, count]) => `${count.toLocaleString("en")} votes for ${name}`)
3737
.join("\n")}`,
38-
stroke: "currentColor",
38+
stroke: "black",
3939
strokeWidth: 0.5
4040
}
4141
)

0 commit comments

Comments
 (0)