Skip to content

Commit

Permalink
Add the bar chart
Browse files Browse the repository at this point in the history
Issue #61
  • Loading branch information
slifty committed Mar 27, 2019
1 parent e791fb6 commit 56e0888
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
21 changes: 21 additions & 0 deletions src/client/components/Sidebar/DetailPane/FlagChart.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,17 @@ const RawPercentage = styled.div`
text-align: center;
`

const HorizantalBarChart = styled.div`
margin-top: 30px;
display: flex;
height: 50px;
`

const HorizantalBar = styled.div`
background: ${props => props.color};
width: ${props => props.width}%;
`


// Component
class FlagChart extends React.Component {
Expand Down Expand Up @@ -135,6 +146,16 @@ class FlagChart extends React.Component {
</BoxDescription>
</PercentageBox>
</PercentageRow>
<HorizantalBarChart>
<HorizantalBar
color="#6EB6EA"
width={dPercent}
/>
<HorizantalBar
color="#DA696C"
width={rPercent}
/>
</HorizantalBarChart>
</Wrapper>
</>
)
Expand Down
1 change: 1 addition & 0 deletions src/client/components/Sidebar/ListPane/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ class ListPane extends React.Component {
<FlagList>
{ flaggedPhrases.map(flaggedPhrase => (
<FlagCard
key={flaggedPhrase.text}
flaggedPhrase={flaggedPhrase}
/>
))}
Expand Down

0 comments on commit 56e0888

Please sign in to comment.