Skip to content

Commit cb29daa

Browse files
committed
stack on the x channel when specified as a {value, scale} object (ChannelSpec)
but I am confused; shouldn't this be done more generally in valueof?
1 parent 60c805b commit cb29daa

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/transforms/stack.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import {InternMap, cumsum, greatest, group, groupSort, max, min, rollup, sum} fr
22
import {ascendingDefined, descendingDefined} from "../defined.js";
33
import {withTip} from "../mark.js";
44
import {maybeApplyInterval, maybeColumn, maybeZ, maybeZero} from "../options.js";
5-
import {column, field, mid, one, range, valueof} from "../options.js";
5+
import {column, field, maybeValue, mid, one, range, valueof} from "../options.js";
66
import {basic} from "./basic.js";
77
import {exclusiveFacets} from "./exclusiveFacets.js";
88

@@ -87,7 +87,7 @@ function stack(x, y = one, kx, ky, {offset, order, reverse}, options) {
8787
return [
8888
basic(options, (data, facets, plotOptions) => {
8989
({data, facets} = exclusiveFacets(data, facets));
90-
const X = x == null ? undefined : setX(maybeApplyInterval(valueof(data, x), plotOptions?.[kx]));
90+
const X = x == null ? undefined : setX(maybeApplyInterval(valueof(data, maybeValue(x).value), plotOptions?.[kx]));
9191
const Y = valueof(data, y, Float64Array);
9292
const Z = valueof(data, z);
9393
const compare = order && order(data, X, Y, Z);

0 commit comments

Comments
 (0)