Commit f101aec
committed
fix(pie): cycle stroke.colors across slices instead of indexing off the end
Pie/donut/polarArea data is a single series, so a user-supplied
`stroke.colors` shorter than the slice count was not padded by the theme
engine (unlike fill colors, which already cycle via pushExtraColors). The
per-slice draw indexed `lineColorArr[i]` directly, so only slice 0 got the
requested color and the remaining slices fell back to a grey default —
e.g. `stroke: { colors: ['#fff'] }` left all but the first border grey.
Cycle the array with `lineColorArr[i % length]` so a single color borders
every slice, matching fill-color behaviour. Backward compatible: callers
passing a full-length array still hit `[i]`; an empty array stays undefined.1 parent 25c8202 commit f101aec
1 file changed
Lines changed: 8 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
303 | 303 | | |
304 | 304 | | |
305 | 305 | | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
306 | 312 | | |
307 | | - | |
| 313 | + | |
| 314 | + | |
308 | 315 | | |
309 | 316 | | |
310 | 317 | | |
| |||
0 commit comments