-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
67aa6f3
commit 2727f34
Showing
5 changed files
with
139 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
@keyframes growAnimation { | ||
from { | ||
width: 0; | ||
} | ||
to { | ||
width: 100%; | ||
} | ||
} | ||
.bar-collection{ | ||
font-weight: 600; | ||
} | ||
.bar-info{ | ||
margin-bottom: 1em; | ||
} | ||
.bar { | ||
width: 100%; | ||
overflow: hidden; /* Hide overflow content */ | ||
font-weight: 400; | ||
display: flex; | ||
align-items: center; | ||
font-style: italic; | ||
} | ||
.value{ | ||
width: 15%; | ||
} | ||
.jam { | ||
display: flex; | ||
justify-content: space-between; | ||
background-color: lightblue; | ||
animation: growAnimation 2s forwards; | ||
box-sizing: border-box; | ||
border-radius: 16px; | ||
color: #838389; | ||
width: 85%; | ||
|
||
} | ||
.bar:hover{ | ||
cursor: pointer; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import React from "react"; | ||
import './bar.css'; | ||
|
||
export function Bar(props){ | ||
|
||
var stats = props.props; | ||
console.log(stats) | ||
|
||
return( | ||
<div className="bar"> | ||
<div className="value">{stats[0]}</div> | ||
<div className="jam"> | ||
<div style={{width:`${stats[1]}%`, backgroundColor: "beige", borderRadius: "16px", padding: "0.5em 1em", boxSizing: "border-box"}}> | ||
<div>{stats[1]}</div> | ||
</div> | ||
</div> | ||
</div> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
import React from "react"; | ||
import './bar.css'; | ||
import { Bar } from "./bar"; | ||
|
||
export function Bars(stats, percentileGroup){ | ||
|
||
var statistics = stats.stats; | ||
console.log(statistics) | ||
|
||
|
||
return( | ||
<div className="bar-collection"> | ||
<div className="bar-info"> | ||
Expected Goals per 90 | ||
<Bar props={statistics.standard_stats.xG90}/> | ||
</div> | ||
<div className="bar-info"> | ||
Non-penalty xG per 90 | ||
<Bar props={statistics.standard_stats.nonPenXG90}/> | ||
</div> | ||
<div className="bar-info"> | ||
Goals per 90 | ||
<Bar props={statistics.standard_stats.goals90}/> | ||
</div> | ||
<div className="bar-info"> | ||
Non-penalty Goals per 90 | ||
<Bar props={statistics.standard_stats.nonPenGoals90}/> | ||
</div> | ||
<div className="bar-info"> | ||
Goals minus xG | ||
<Bar props={statistics.shooting_stats.goalsMinusXG}/> | ||
</div> | ||
<div className="bar-info"> | ||
Goals minus Non-penalty xG | ||
<Bar props={statistics.shooting_stats.nonPenGoalsMinusXG}/> | ||
</div> | ||
<div className="bar-info"> | ||
Non-penalty xG per Shot | ||
<Bar props={statistics.shooting_stats.nonPenXGPerShot90}/> | ||
</div> | ||
<div className="bar-info"> | ||
Shots per 90 | ||
<Bar props={statistics.shooting_stats.shots90}/> | ||
</div> | ||
<div className="bar-info"> | ||
Shots on Target per 90 | ||
<Bar props={statistics.shooting_stats.shotOnTarget90}/> | ||
</div> | ||
<div className="bar-info"> | ||
Avg. Shot Distance from Goal | ||
<Bar props={statistics.shooting_stats.avgShotDistance}/> | ||
</div> | ||
</div> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters