Open LiveXenon opened 2 years ago
any love for this ?
Yeah, I had the same error but I was able to get by it mapping through the data supplied to the chart first before passing it to chart helped. More like this :
cost exampleData = [ { x: 10, y: 1 }, { x: 11, y: 1 } ]
const areBidPricesSame = fundData.every((item) => item.y === exampleData[0].y);
if (areBidPricesSame) { return (
);
}
return ( <Chart data={exampleData.map((i, index) => ({ x: index + Math.random(), y: i.y, }))}
>
</Chart>
); };
You can display a table once the y-axis has the same data otherwise the chart is displayed. This won't break your app.
Encountered two children with the same key,
1
. Keys should be unique so that components maintain their identity across updates. Non-unique keys may cause children to be duplicated and/or omitted — the behavior is unsupported and could change in a future version.The problem appears when graph contains 2 or more equal y values, example:
Affected platforms: iOS and Android