Skip to content

Commit

Permalink
development
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfiex committed Dec 2, 2024
1 parent 92f43b9 commit fe7c1b3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion static/treemap/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ async function createTreemap() {
.attr('fill-opacity', (d, i, nodes) =>
i === nodes.length - 1 ? 0.7 : null
)
.attr('font-size', (d, i, nodes) =>d.depth>2?"0.6em":'1em')
.text((d) => d);

// Positioning for parent nodes (with children)
Expand All @@ -124,7 +125,7 @@ async function createTreemap() {
.attr('x', 3)
.attr('y', (d, i, nodes) => {
const isLastItem = i === nodes.length - 1;
return isLastItem ? '1.4em' : `${i * 0.9}em`;
return isLastItem ? '1.4em' : '1em';//`${i * 0.9}em`;
});

return svg.node();
Expand Down

0 comments on commit fe7c1b3

Please sign in to comment.