color_discrete_map in px.pie() should require color argument
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 18.8k
- Forks
- 2.8k
- Avg merge
- 16h 26m
- Merged PRs (30d)
- 21
Description
Modified example from tutorial :
df = px.data.tips()
fig = px.pie(df, values='tip', names='day',
color_discrete_map={'Thur':'lightcyan',
'Fri':'cyan',
'Sat':'royalblue',
'Sun':'darkblue'})
fig.show()
will not color the pie chart according to values specified in color_discrete_map. If the variable is not used in any way (unless I'm unaware of some hidden mechanism), user should be notified with a warning or an error that 'color_discrete_map' will not be used because 'color' argument was not specified.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the tutorial example through the px.pie() entry point, with color_discrete_map supplied but no color argument. Trace how these arguments are handled and determine whether the completed behavior should warn or error when the map cannot be used; done means the case no longer fails silently.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data-visualization
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100