Skip to content

more treemap#1732

Draft
Fil wants to merge 5 commits intombostock/treemapfrom
fil/treemap
Draft

more treemap#1732
Fil wants to merge 5 commits intombostock/treemapfrom
fil/treemap

Conversation

@Fil
Copy link
Copy Markdown
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