layerchart 0.3.4 → 0.3.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -61,8 +61,8 @@ $: {
|
|
|
61
61
|
}
|
|
62
62
|
$: root = treemap($data);
|
|
63
63
|
$: selected = root; // set initial selection
|
|
64
|
-
// group nodes by
|
|
65
|
-
$:
|
|
64
|
+
// group nodes by depth so can be rendered lowest to highest
|
|
65
|
+
$: nodesByDepth = group(root, (d) => d.depth);
|
|
66
66
|
const duration = 800;
|
|
67
67
|
const extents = tweened(undefined, { easing: cubicOut, duration });
|
|
68
68
|
$: $extents = selected
|
|
@@ -83,7 +83,7 @@ $: yScale = scaleLinear().domain([$extents.y0, $extents.y1]).rangeRound([0, $hei
|
|
|
83
83
|
</script>
|
|
84
84
|
|
|
85
85
|
<RectClipPath width={$width} height={$height}>
|
|
86
|
-
{#each Array.from(
|
|
86
|
+
{#each Array.from(nodesByDepth) as [depth, nodes]}
|
|
87
87
|
<g>
|
|
88
88
|
{#each nodes as node}
|
|
89
89
|
<slot
|
package/package.json
CHANGED