We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 650529a commit 5fa920dCopy full SHA for 5fa920d
src/plot.js
@@ -15,7 +15,11 @@ export function plot(options = {}) {
15
}
16
17
// Flatten any nested marks.
18
- const marks = options.marks === undefined ? [] : options.marks.flat(Infinity);
+ const marks = options.marks === undefined ? [] : options.marks.flat(Infinity)
19
+ .map(mark => typeof mark === "function" ? {
20
+ initialize: () => ({ index: [], channels: [] }),
21
+ render: mark
22
+ } : mark);
23
24
// A Map from Mark instance to an object of named channel values.
25
const markChannels = new Map();
0 commit comments