Skip to content

Commit 41701bd

Browse files
committed
fix for orthogonal color and symbol
1 parent 2e43f40 commit 41701bd

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/marks/dot.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,11 @@ export class Dot extends Mark {
3838
const {channels} = this;
3939
const symbolChannel = channels.find(({scale}) => scale === "symbol");
4040
if (symbolChannel) {
41+
const fillChannel = channels.some(({name}) => name === "fill");
42+
const strokeChannel = channels.some(({name}) => name === "stroke");
4143
symbolChannel.hint = {
42-
fill: channels.some(({name}) => name === "fill") ? "color" : this.fill,
43-
stroke: channels.some(({name}) => name === "stroke") ? "color" : this.stroke
44+
fill: fillChannel && fillChannel.value === symbolChannel.value ? "color" : this.fill,
45+
stroke: strokeChannel && strokeChannel.value === symbolChannel.value ? "color" : this.stroke
4446
};
4547
}
4648
}

0 commit comments

Comments
 (0)