From cb29daa23ef84b3f84f3f299850fda070369726b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philippe=20Rivi=C3=A8re?= Date: Tue, 12 Sep 2023 15:54:55 +0200 Subject: [PATCH] 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? --- src/transforms/stack.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/transforms/stack.js b/src/transforms/stack.js index 9c96997af0..44e96b798d 100644 --- a/src/transforms/stack.js +++ b/src/transforms/stack.js @@ -2,7 +2,7 @@ import {InternMap, cumsum, greatest, group, groupSort, max, min, rollup, sum} fr import {ascendingDefined, descendingDefined} from "../defined.js"; import {withTip} from "../mark.js"; import {maybeApplyInterval, maybeColumn, maybeZ, maybeZero} from "../options.js"; -import {column, field, mid, one, range, valueof} from "../options.js"; +import {column, field, maybeValue, mid, one, range, valueof} from "../options.js"; import {basic} from "./basic.js"; import {exclusiveFacets} from "./exclusiveFacets.js"; @@ -87,7 +87,7 @@ function stack(x, y = one, kx, ky, {offset, order, reverse}, options) { return [ basic(options, (data, facets, plotOptions) => { ({data, facets} = exclusiveFacets(data, facets)); - const X = x == null ? undefined : setX(maybeApplyInterval(valueof(data, x), plotOptions?.[kx])); + const X = x == null ? undefined : setX(maybeApplyInterval(valueof(data, maybeValue(x).value), plotOptions?.[kx])); const Y = valueof(data, y, Float64Array); const Z = valueof(data, z); const compare = order && order(data, X, Y, Z);