Skip to content

Commit f8fd2e5

Browse files
committed
default fill to none if stroke
1 parent 89023cb commit f8fd2e5

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/marks/area.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ export class Area extends Mark {
2323
...options
2424
} = {}
2525
) {
26-
const [vfill, cfill] = maybeColor(fill, "currentColor");
2726
const [vstroke, cstroke] = maybeColor(stroke, "none");
27+
const [vfill, cfill] = maybeColor(fill, cstroke === "none" ? "currentColor" : "none");
2828
if (z === undefined && vfill != null) z = vfill;
2929
if (z === undefined && vstroke != null) z = vstroke;
3030
super(

src/marks/bar.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ export class AbstractBar extends Mark {
2323
...options
2424
} = {}
2525
) {
26-
const [vfill, cfill] = maybeColor(fill, "currentColor");
2726
const [vstroke, cstroke] = maybeColor(stroke, "none");
27+
const [vfill, cfill] = maybeColor(fill, cstroke === "none" ? "currentColor" : "none");
2828
super(
2929
data,
3030
[

src/marks/rect.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ export class Rect extends Mark {
2626
...options
2727
} = {}
2828
) {
29-
const [vfill, cfill] = maybeColor(fill, "currentColor");
3029
const [vstroke, cstroke] = maybeColor(stroke, "none");
30+
const [vfill, cfill] = maybeColor(fill, cstroke === "none" ? "currentColor" : "none");
3131
super(
3232
data,
3333
[

0 commit comments

Comments
 (0)