mirror of
https://github.com/dat515-2025/Group-8.git
synced 2026-03-22 15:12:08 +01:00
fix(frontend): Fixed type error
This commit is contained in:
@@ -30,9 +30,9 @@ function SinglePieChart({ data, title }: { data: { name: string; value: number }
|
|||||||
fill="#8884d8"
|
fill="#8884d8"
|
||||||
dataKey="value"
|
dataKey="value"
|
||||||
nameKey="name"
|
nameKey="name"
|
||||||
label={({ name, percent }) => `${name} ${(percent * 100).toFixed(0)}%`}
|
label={(props: any) => `${props.name} ${(props.percent * 100).toFixed(0)}%`}
|
||||||
>
|
>
|
||||||
{data.map((entry, index) => (
|
{data.map((_entry, index) => (
|
||||||
<Cell key={`cell-${index}`} fill={COLORS[index % COLORS.length]} />
|
<Cell key={`cell-${index}`} fill={COLORS[index % COLORS.length]} />
|
||||||
))}
|
))}
|
||||||
</Pie>
|
</Pie>
|
||||||
|
|||||||
Reference in New Issue
Block a user