Skip to content

treemap #1224

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 1 commit into
base: main
Choose a base branch
from
Draft

treemap #1224

wants to merge 1 commit into from

Conversation

mbostock
Copy link
Member

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
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
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.

2 participants