Skip to content

Facet expand #1069

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 18 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix a test
  • Loading branch information
mbostock committed Sep 30, 2022
commit 171e97b3c21f517fea6bc4a367226049b335c83c
9 changes: 5 additions & 4 deletions test/marks/bar-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,12 @@ it("barX(data, {fill}) allows fill to be null", () => {
});

it("barX(data, {fill}) allows fill to be a variable color", () => {
const bar = Plot.barX(undefined, {fill: "x"});
const data = [{x: 1}, {x: 2}];
const bar = Plot.barX(data, {fill: "x"});
assert.strictEqual(bar.fill, undefined);
const {fill} = bar.channels;
assert.strictEqual(fill.value, "x");
assert.strictEqual(fill.scale, "color");
const {channels} = bar.initialize([[0, 1]]);
assert.deepStrictEqual(channels.fill.value, [1, 2]);
assert.strictEqual(channels.fill.scale, "color");
});

it("barX(data, {stroke}) allows stroke to be a constant color", () => {
Expand Down