plotly / plotly/plotly.py

plotly-express px.treemap has no access to totals

Open
#4,132 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature P3
Dominant language
Python
Stars
18.8k
Forks
2.8k
Avg merge
16h 26m
Merged PRs (30d)
21

Description

treemap() has no acees or properties for displaying parent values, even though the values are present in the hover data. I managed to pre-calculate the data and add it into the label property.

fig = px.treemap(shares_data,
title=tit,
path=['Type', 'Stock'],
values='Holding',
color='Growth',
color_continuous_scale=[(0, "red"), (0.33, "yellow"), (1, "green")]
)
stonks_plotly2
stonks_plotly1

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

Start at plotly.express.treemap() and trace how parent totals already present in hover data are handled. Determine the supported way to expose those totals for display without pre-calculating them, then verify that treemap output provides the requested access.

Written by the indexing model from the issue text.

Assessment

Tech stack
plotly, python
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.