Skip to content

Commit 8ece034

Browse files
committed
the tree transform creates new facets (not tested)
1 parent c23dc13 commit 8ece034

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/transforms/tree.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import {stratify, tree} from "d3";
22
import {ascendingDefined} from "../defined.js";
33
import {column, identity, isObject, one, valueof} from "../options.js";
44
import {basic} from "./basic.js";
5+
import {originals} from "../facet.js";
56

67
/**
78
* Based on the tree options described above, populates the **x** and **y**
@@ -155,7 +156,7 @@ export function treeLink(options = {}) {
155156
if (layout.nodeSize) layout.nodeSize([1, 1]);
156157
if (layout.separation && treeSeparation !== undefined) layout.separation(treeSeparation ?? one);
157158
for (const o of outputs) o[output_values] = o[output_setValues]([]);
158-
for (const facet of facets) {
159+
for (const facet of originals(facets)) {
159160
const treeFacet = [];
160161
const root = rootof(facet.filter((i) => P[i] != null)).each((node) => (node.data = data[node.data]));
161162
if (treeSort != null) root.sort(treeSort);

0 commit comments

Comments
 (0)