mirror of
https://github.com/amineo/t2-stat-parser.git
synced 2026-01-19 17:34:43 +00:00
Display a 'No Data' label on radar chart if there isnt any data
This commit is contained in:
parent
e601fe8e91
commit
063f6ba55b
|
|
@ -43,7 +43,7 @@ export default function Player(props) {
|
||||||
spawnctf={props.playerData.player.total_games_sctfgame}
|
spawnctf={props.playerData.player.total_games_sctfgame}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<RadarChart cx={300} cy={250} outerRadius={150} width={600} height={500} data={returnWeaponTotals(props.playerData.totals)} className="text-sm">
|
<RadarChart cx={300} cy={250} outerRadius={150} width={600} height={500} data={ returnWeaponTotals(props.playerData.totals).length ? returnWeaponTotals(props.playerData.totals) : [{ weapon: 'No Data', val:1}]} className="text-sm">
|
||||||
<PolarGrid />
|
<PolarGrid />
|
||||||
<PolarAngleAxis dataKey="weapon" />
|
<PolarAngleAxis dataKey="weapon" />
|
||||||
<PolarRadiusAxis/>
|
<PolarRadiusAxis/>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue