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 5fa920d commit 2dca478Copy full SHA for 2dca478
src/plot.js
@@ -15,11 +15,12 @@ export function plot(options = {}) {
15
}
16
17
// Flatten any nested marks.
18
- const marks = options.marks === undefined ? [] : options.marks.flat(Infinity)
19
- .map(mark => typeof mark === "function" ? {
20
- initialize: () => ({ index: [], channels: [] }),
21
- render: mark
22
- } : mark);
+ const marks = options.marks === undefined ? [] : options.marks.flat(Infinity);
+ for (const mark of marks) {
+ if (mark.initialize === undefined) {
+ mark.initialize = () => ({ index: [], channels: [] });
+ }
23
24
25
// A Map from Mark instance to an object of named channel values.
26
const markChannels = new Map();
0 commit comments