We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 25c8202 + f101aec commit 11aed69Copy full SHA for 11aed69
1 file changed
src/charts/Pie.js
@@ -303,8 +303,15 @@ class Pie {
303
304
const elPath = graphics.drawPath({
305
d: path,
306
+ // Pie/donut/polarArea data is a single series, so a user-supplied
307
+ // `stroke.colors` shorter than the slice count is NOT padded by the
308
+ // theme engine (unlike fill colors, which cycle). Without this, only
309
+ // slice 0 gets the requested color and the rest fall back to a grey
310
+ // default. Cycle the array — matching fill-color behaviour — so a
311
+ // single `stroke.colors: ['#fff']` borders every slice as expected.
312
stroke: Array.isArray(this.lineColorArr)
- ? this.lineColorArr[i]
313
+ ? this.lineColorArr[i] ??
314
+ this.lineColorArr[i % this.lineColorArr.length]
315
: this.lineColorArr,
316
strokeWidth: 0,
317
fill: pathFill,
0 commit comments