plotly / plotly/dash

provide selectedData/MultiSelect for pie chart

Open
#2,334 1 comment 10 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature P3
Dominant language
Python
Stars
24.4k
Forks
2.3k
Avg merge
2d 7h
Merged PRs (30d)
13

Description

Thanks so much for your interest in Dash!

Before posting an issue here, please check the Dash community forum to see if the topic has already been discussed. The community forum is also great for implementation questions. When in doubt, please feel free to just post the issue here :)

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
I'm always frustrated when I try to create a dashboard with a pie chart and in order to filter the dashboard using the pie chart I can only select one slice of the pie chart to filter by, unlike bar charts and other visualizations where the color of the unselected data darken in the pie chart you need to implement it yourself using callbacks, and if I want to select more than one slice I need to save the selected data in a dcc store or a div and check every time someone clicks on another slice, Is there data saved in the store, which data is it? if it's not the same as the newly selected slice add it if not remove it and build + style the pie chart from scratch.

Describe the solution you'd like
A clear and concise description of what you want to happen.
Implement selectedData in the pie chart, now because it's a pie chart instead of a box select used in bar charts and other charts, you can implement it so it uses click events. and if the slice is selected then deselect it and if it's not select it then select it.
now if we select a slice it will grey out all the slices that are not selected, and update the selectedData to be with all the selected slices data.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
I wrote a partial solution in the feature problem section.

Additional context
Add any other context or screenshots about the feature request here.
it's a feature that exists in any bi tool out there, it's an important feature in order to create interactive dashboards a critical one even. so really hoping it can be implemented!
thank you plotly team for the hard work!

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 names no files, tests, or entry points; start by locating the pie-chart component and the existing selectedData behavior for other visualizations. Done means clicking slices toggles their selection, selectedData contains all selected slices, and unselected slices are visually dimmed.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data-visualization
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.