Skip to content

Commit

Permalink
stack on the x channel when specified as a {value, scale} object (Cha…
Browse files Browse the repository at this point in the history
…nnelSpec)

but I am confused; shouldn't this be done more generally in valueof?
  • Loading branch information
Fil committed Sep 12, 2023
1 parent 60c805b commit cb29daa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/transforms/stack.js
Original file line number Diff line number Diff line change
Expand Up @@ -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";

Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit cb29daa

Please sign in to comment.