Skip to content

Commit b548977

Browse files
committed
extra channels!
1 parent f7173f5 commit b548977

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

src/channel.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ export type ChannelName =
6161
* An object literal of channel definitions. This is also used to represent
6262
* materialized channel states after mark initialization.
6363
*/
64-
export type Channels = {[key in ChannelName]?: Channel};
64+
export type Channels = Record<string, Channel>;
6565

6666
/**
6767
* A channel definition. This is also used to represent the materialized channel

test/plots/tooltip.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,16 @@ export async function tooltipDotFacets() {
2222
},
2323
marks: [
2424
Plot.dot(athletes, {x: "weight", y: "height", fx: "sex", fy: "date_of_birth"}),
25-
Plot.tooltip(athletes, {x: "weight", y: "height", fx: "sex", fy: "date_of_birth"})
25+
Plot.tooltip(athletes, {
26+
x: "weight",
27+
y: "height",
28+
fx: "sex",
29+
fy: "date_of_birth",
30+
channels: {
31+
name: {value: "name"},
32+
sport: {value: "sport"}
33+
}
34+
})
2635
]
2736
});
2837
}

0 commit comments

Comments
 (0)