Skip to content

more treemap #1732

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 5 commits into
base: mbostock/treemap
Choose a base branch
from
Draft

more treemap #1732

wants to merge 5 commits into from

Conversation

Fil
Copy link
Contributor

@Fil Fil commented Jul 3, 2023

Several elements that might help with treemaps.

clipping to a rect (#1109)

There are two issues here:

  • how do we implement the rect clipping? Since Chromium doesn't support the view-box keyword we have two possibilities: either adding a svg element (which I did here), or a clipPath with a unique id and a url().
  • Is this not an indication that we want a "boxtext" mark, which would combine rect+text in a smarter way (in particular, allowing to anchor the text to either side of the rect)

node:branch and node:size helpers

node:branch retrieves the id of the top-level branch and color the rects; the original example was using the internal d3 hierarchy object, which shows a leaky abstraction; should this leak be closed?

node:size shows the value.

a default text and title

default text is the node:name, default title is node:name + node:size

I'm happy that it generally works, but it opens a few questions about how to make this as generic as possible.

faceting

treemap areas are comparable across facets

todo:

  • a normalize option, or “proportion-facet” reducer?

Fil added 4 commits July 3, 2023 13:08
assuming that channels x1, x2, y1, y2 are specified. An alternative would be to create a "textbox" mark which would combine a rect and a text; it would probably allow more nice things, like anchoring the text to the left of the box…
@Fil Fil mentioned this pull request Jul 3, 2023
8 tasks
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.

1 participant