Open soroushm opened 4 years ago
I hope this helps you still but I had the same problem and I could fix it with a workaround.
Just go to Pie.js
and find RoundDividers
function and then the following part of the code:
if (paintedSections.length > 1 && visible) {
paintedSections.forEach((section, index) => {
const {color, startAngle} = section;
for (let i = 0; i < dividerSize + 2; i++) {
dividerArray.push(
<ArcShape
key={index} // ===> Should be replaced with something unique. I had replaced it with `'DA'+index+i.toString()`
dimensions={dimensions}
color={backgroundColor}
startAngle={
startAngle + section.arcAngle + dividerSize + i - dividerOffSet
}
arcAngle={1}
isBezian={isBezian}
strokeCap={strokeCap}
/>,
);
dividerColorOverlayArray.push(
<ArcShape
key={index} // ===> Should be replaced with something unique. I had replaced it with `'DCOA'+index+i.toString()`
dimensions={dimensions}
color={color}
startAngle={
startAngle + section.arcAngle - dividerSize + i - dividerOffSet
}
arcAngle={1}
isBezian={isBezian}
strokeCap={strokeCap}
/>,
);
}
});
}
As you can see in the warnings, those key
s aren't unique, and you should replace them with unique keys.
I wrote my personal workaround in the above code snippet.
Looks like artGroup using I for key and for each item on pie have a duplicate key