Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove redundant color_discrete_sequence check in apply_default_cascade
- Remove redundant check that was setting color_discrete_sequence to None
- The check is unnecessary since we only assign trace_specific_colors when any() is True
- Fallback logic to layout.colorway and qualitative.D3 remains intact
  • Loading branch information
antonymilne committed Dec 4, 2025
commit c24b05c513a8212f10623a50c0107e8b585daaf5
5 changes: 0 additions & 5 deletions plotly/express/_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -1056,11 +1056,6 @@ def apply_default_cascade(args, constructor):
# If template contains at least one color for this trace type, assign to color_discrete_sequence
if any(trace_specific_colors):
args["color_discrete_sequence"] = trace_specific_colors

if not args["color_discrete_sequence"] or not any(
args["color_discrete_sequence"]
):
args["color_discrete_sequence"] = None
# fallback to layout.colorway if trace-specific colors not available
if args["color_discrete_sequence"] is None and args["template"].layout.colorway:
args["color_discrete_sequence"] = args["template"].layout.colorway
Expand Down