plotly / plotly/plotly.js

Remove label gap in treemap

Open
#6,949 0 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature P3
Dominant language
JavaScript
Stars
18.3k
Forks
2k
Avg merge
2d 12h
Merged PRs (30d)
28

Description

Hello. I have been finding plotly's treemaps very useful

One feature that I would find helpful is being able to remove the gap below each box label.

The problem is that for smaller boxes, the gap ends up taking a large amount of the space. This space is essentially wasted, and it makes each node's children proportionally smaller than they otherwise would be. This prevents an accurate visual comparison between one parent's children to another parent's children.

I have highlighted what I mean in the figure below using red arrows

image

Charts with lots of nesting would benefit a lot from being able to use this space

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue does not name an implementation file or test. Start by locating the treemap entry point and existing layout or rendering tests, then compare nested boxes with and without the label gap. Done should provide a way to remove that gap so child areas are larger and proportions remain visually comparable.

Written by the indexing model from the issue text.

Assessment

Tech stack
d3, javascript
Domain
data-visualization
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.