Is there a way to plot in my radar graph the Objective for each participant "Mona", "Paul","Bastien", "Anton" as my picture down below ?
For now, I can only display "Mona", "Paul","Bastien", "Anton" (please again see my picture).
Here is the json from my api:
{
"names": [
{
"Mona": 63,
"Paul": 29,
"Bastien": 31,
"Anton":25,
"Average": 75
}
],
"locations" : [...],
}
Here my function, and what do I have to change in order to get the same result as my picture please? :
const { names, locations } = graphs ?? {}
function RadarNames() {
const data = Object.entries(graphs.names[0]).map(([key, value]) => ({
"name": key,
"age": value,
}))
return creacteChart({
data: data,
polarAngleAxisOptions: { dataKey: 'name' },
radars: [
{
name: 'name',
dataKey: 'age',
},
{
name: 'Average',
dataKey: 'Average',
},
],
})
}