Skip to content

Commit 0a38a58

Browse files
committed
don’t declare initialized channels
Reverts c6ad4bb (#930).
1 parent 4735253 commit 0a38a58

File tree

2 files changed

+2
-9
lines changed

2 files changed

+2
-9
lines changed

src/options.js

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -196,13 +196,6 @@ export function maybeColumn(source) {
196196
return source == null ? [source] : column(source);
197197
}
198198

199-
// Used by initializers to declare channels that will be initialized. The
200-
// initial value of these channels is undefined (since they aren’t constructed
201-
// until the initializer is invoked).
202-
export function initialized() {
203-
return {transform() {}};
204-
}
205-
206199
export function labelof(value, defaultValue) {
207200
return typeof value === "string" ? value
208201
: value && value.label !== undefined ? value.label

src/transforms/dodge.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import IntervalTree from "interval-tree-1d";
22
import {finite, positive} from "../defined.js";
3-
import {identity, initialized, number, valueof} from "../options.js";
3+
import {identity, number, valueof} from "../options.js";
44
import {coerceNumbers} from "../scales.js";
55
import {initializer} from "./basic.js";
66

@@ -51,7 +51,7 @@ function dodge(y, x, anchor, padding, options) {
5151
options = {...options, channels: [...channels ?? [], {name: "r", value: r, scale: "r"}]};
5252
if (sort === undefined && reverse === undefined) options.sort = {channel: "r", order: "descending"};
5353
}
54-
return initializer({...options, [y]: initialized()}, function(data, facets, {[x]: X, r: R}, scales, dimensions) {
54+
return initializer(options, function(data, facets, {[x]: X, r: R}, scales, dimensions) {
5555
if (!X) throw new Error(`missing channel: ${x}`);
5656
X = coerceNumbers(valueof(X.value, scales[X.scale] || identity));
5757
const r = R ? undefined : this.r !== undefined ? this.r : options.r !== undefined ? number(options.r) : 3;

0 commit comments

Comments
 (0)