Commit 83faec8
committed
Support trace-specific color sequences in Plotly Express via templates
- Modify apply_default_cascade to check template.data.<trace_type> for marker.color or line.color
- Fallback to template.layout.colorway if trace-specific colors not found
- Add comprehensive tests for trace-specific color sequences
- Handle timeline special case (maps to bar trace type)
- Follow existing patterns for symbol_sequence and line_dash_sequence
Fixes #54161 parent 965b3bd commit 83faec8
File tree
2 files changed
+94
-5
lines changed- plotly/express
- tests/test_optional/test_px
2 files changed
+94
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1037 | 1037 | | |
1038 | 1038 | | |
1039 | 1039 | | |
| 1040 | + | |
| 1041 | + | |
| 1042 | + | |
1040 | 1043 | | |
1041 | 1044 | | |
1042 | 1045 | | |
1043 | 1046 | | |
1044 | 1047 | | |
1045 | 1048 | | |
1046 | 1049 | | |
1047 | | - | |
| 1050 | + | |
| 1051 | + | |
1048 | 1052 | | |
1049 | 1053 | | |
1050 | 1054 | | |
1051 | 1055 | | |
1052 | | - | |
1053 | | - | |
| 1056 | + | |
| 1057 | + | |
| 1058 | + | |
1054 | 1059 | | |
1055 | 1060 | | |
1056 | 1061 | | |
1057 | 1062 | | |
1058 | | - | |
1059 | | - | |
| 1063 | + | |
| 1064 | + | |
| 1065 | + | |
| 1066 | + | |
1060 | 1067 | | |
1061 | 1068 | | |
| 1069 | + | |
1062 | 1070 | | |
1063 | 1071 | | |
1064 | 1072 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
226 | 226 | | |
227 | 227 | | |
228 | 228 | | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
229 | 310 | | |
230 | 311 | | |
231 | 312 | | |
| |||
0 commit comments