Skip to content

treemap#1224

Draft
mbostock wants to merge 1 commit into
mainfrom
mbostock/treemap
Draft

treemap#1224
mbostock wants to merge 1 commit into
mainfrom
mbostock/treemap

Conversation

@mbostock
Copy link
Copy Markdown
Member

@mbostock mbostock commented Jan 13, 2023

Fixes #1710. Quick sketch of a treemap mark and transform. TODO

  • treemap layout
  • value option
  • tiling method option
  • labels
  • clipping for labels?
  • aspect ratio based on chart dimensions? or on default height?
  • rounding option (only makes sense when computing treemap in screen coordinates)
  • option for showing internal nodes (nested or cascading treemap)

I kind of wonder if this should be an initializer so that it can access the chart dimensions (and since in any case the x and y scales won’t be meaningful).

@mbostock mbostock requested a review from Fil January 13, 2023 21:50
@Fil
Copy link
Copy Markdown
Contributor

Fil commented Jan 16, 2023

Love it!

As a random remark, if we let users specify their own tiling method, can we anticipate that some tiles might be generic polygons rather that rectangles (and maybe base this mark on Plot.geo in that case?). I'm thinking of @Kcnarf’s voronoi treemaps, of course.

We'll also need a strategy for faceting (maybe using frameAnchor decide where the facet with the smaller total aligns its treemap).

Link: this earlier experiment of a treemap plugin https://observablehq.com/@observablehq/plot-layouts-treemap-775 (#775).

@mbostock mbostock mentioned this pull request Jun 22, 2023
@Fil Fil force-pushed the mbostock/treemap branch from 4fe4e91 to c1a1ced Compare July 2, 2023 07:20
@Fil
Copy link
Copy Markdown
Contributor

Fil commented Jul 3, 2023

I'm pushing a few experiments in #1732. We'll also need a strategy for faceting; in particular, the surface area between facets should be comparable—a proportion reducer would equalize the total area to 1 on each facet.

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.

Treemaps

2 participants