mirror of
https://github.com/whit3rabbit/anyllm-proxy.git
synced 2026-09-22 00:00:50 +00:00
fix(admin-ui): use stable index key in LineChart series map
This commit is contained in:
@@ -58,7 +58,7 @@ export default function LineChart({
|
||||
stroke={gridColor}
|
||||
/>
|
||||
))}
|
||||
{series.map((s) => {
|
||||
{series.map((s, i) => {
|
||||
if (s.data.length < 2) return null
|
||||
const points = s.data.map((v, i) => `${x(i)},${y(v)}`).join(' ')
|
||||
const areaPoints = [
|
||||
@@ -67,7 +67,7 @@ export default function LineChart({
|
||||
`${x(s.data.length - 1)},${PAD.top + innerH}`,
|
||||
].join(' ')
|
||||
return (
|
||||
<g key={s.label}>
|
||||
<g key={i}>
|
||||
<polygon
|
||||
className="chart-area"
|
||||
points={areaPoints}
|
||||
|
||||
Reference in New Issue
Block a user