-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Global / US / NZ data update + Country Overview graph rejigged
- Loading branch information
Showing
12 changed files
with
9,409 additions
and
982 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
29 changes: 0 additions & 29 deletions
29
client/src/components/regional-advanced/regional-graph-tooltip.js
This file was deleted.
Oops, something went wrong.
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,48 @@ | ||
import React from 'react' | ||
const RegionalGraphToolTip = (tooltipProps) => { | ||
|
||
if(! tooltipProps.hasOwnProperty('payload')) return <></> | ||
|
||
if(! tooltipProps.payload || tooltipProps.payload.length == 0) return <></> | ||
|
||
|
||
const { payload } = tooltipProps.payload[0] | ||
let date = payload.dateString | ||
|
||
|
||
const classes = { | ||
"Tests": "#218c74", | ||
"Confirmed": "#227093", | ||
"Hospitalized": "#ff793f", | ||
"Recovered": "#2ecc71", | ||
"Deaths": "#ff5252", | ||
} | ||
const tidy = new Intl.NumberFormat() | ||
return ( | ||
<> | ||
<div className={`box`} style={{padding: '3px 5px'}}> | ||
<p className="is-size-7"> | ||
{date ? date : ''} | ||
</p> | ||
<table className="is-size-7"> | ||
<tbody> | ||
{ tooltipProps.payload.map((tool,i) => ( | ||
<tr key={i}> | ||
<td style={{textAlign: 'right'}}> | ||
<strong>{tidy.format(tool.value)}</strong> | ||
</td> | ||
<td style={{paddingLeft: '5px'}}> | ||
<strong style={{color: classes[tool.name]}}> | ||
{tool.name} | ||
</strong> | ||
</td> | ||
|
||
</tr> | ||
))} | ||
</tbody> | ||
</table> | ||
</div> | ||
</> | ||
) | ||
} | ||
export default RegionalGraphToolTip |
2 changes: 1 addition & 1 deletion
2
client/src/components/regional-new-zealand/regional-area-graph.js
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
30 changes: 0 additions & 30 deletions
30
client/src/components/regional-new-zealand/regional-graph-tooltip.js
This file was deleted.
Oops, something went wrong.
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