Strange animation behavior with improperly specified color
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 18.8k
- Forks
- 2.8k
- Avg merge
- 16h 26m
- Merged PRs (30d)
- 21
Description
When a scatter line color is specified using rgb() with float values in [0, 1] rather than integers in [0, 255], it seems to actually produce the expected color. However, when animating a scatter trace with a constant color specified this way, it turns to black during the animation. If the animation sets redraw=True it will go back to the "correct" color after the transition completes, but if redraw=False then it stays black.
Here's a colab that demonstrates the issue: https://colab.research.google.com/drive/1enQGu6ProJg22F9KxAwsewf7UvbS3fkF?usp=sharing
I'm not sure if the correct fix to this is to make the animations work the same way as for correctly specified colors or to make incorrectly specified colors always show up as black (i.e. get cast to ints) or raise an error. The current situation results in a difficult to debug behavior.
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 with the linked Colab reproduction and compare scatter animations using rgb() float values with redraw=True and redraw=False. Trace how the constant color is handled during animation versus after a redraw, then establish whether malformed color values should be normalized, rejected, or handled consistently.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data-visualization
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100