Skip to content

treeFilter option#1611

Merged
Fil merged 1 commit into
fil/balanced-treefrom
mbostock/tree-filter
May 22, 2023
Merged

treeFilter option#1611
Fil merged 1 commit into
fil/balanced-treefrom
mbostock/tree-filter

Conversation

@mbostock
Copy link
Copy Markdown
Member

@mbostock mbostock commented May 22, 2023

@mbostock mbostock requested a review from Fil May 22, 2023 16:29
Comment thread src/marks/tree.js
)
)
]
? treeLayout === Tree || treeLayout === Cluster
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just hard-coded this to apply only to the “tidy” tree and cluster layouts (and thereby avoiding it for the indent layout), but we could make this a separate option and use this heuristic as the default.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's probably nicer (for dev exploration at least) to give function implementations of layouts the same "powers" that named layout have. An alternative if we don't want this to be a user-facing option, is to read a special property (.balancedLabels?) on the layout function. (The two layouts from D3 would be tested like you do here.)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I’m in favor of an option if you want to make it configurable (and not some alternative mechanism). Perhaps a textBalanced boolean option? Or you could even override the textAnchor option to be mirrored maybe, but perhaps that’s fancier than it needs to be.

@Fil Fil merged commit 0b2e741 into fil/balanced-tree May 22, 2023
@Fil Fil deleted the mbostock/tree-filter branch May 22, 2023 16:44
@Fil Fil mentioned this pull request May 22, 2023
3 tasks
mbostock added a commit that referenced this pull request Jun 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants