Skip to content

Commit

Permalink
correct obj keys for sweden
Browse files Browse the repository at this point in the history
  • Loading branch information
Sven Henrik Karlsson committed Apr 8, 2020
1 parent 17415e2 commit 4e8e71b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion src/assets/stylesheets/settings/_colors.scss
Original file line number Diff line number Diff line change
Expand Up @@ -329,5 +329,4 @@ $accent: $dark-theme;
deathrate-7: $amber-700;
deathrate-8: $amber-800;
deathrate-9: $amber-900;

}
6 changes: 3 additions & 3 deletions src/components/markers/Markers.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@ const Markers = ({ loadTotal, onClick }) => {
let maxSweConfirmed = 0
let maxSweDeathRate = 0
for (let edge in edges){
let conf = edges[edge].node.Confirmed
let conf = edges[edge].node.Region_Total

if (conf > maxSweConfirmed){
maxSweConfirmed = conf
}
let dr = edges[edge].node.Deaths/(conf+Number.EPSILON)
let dr = edges[edge].node.Region_Deaths/(conf+Number.EPSILON)
console.log(dr)
if (dr > maxSweDeathRate){
maxSweDeathRate = dr
Expand All @@ -52,7 +52,7 @@ const Markers = ({ loadTotal, onClick }) => {
//color = colors.sweden
color = colors['deathrate-' + String(8)]
}
radius = 100 * Math.sqrt((number/maxSweConfirmed)/Math.PI)
radius = 10 * Math.sqrt((number/maxSweConfirmed)/Math.PI)

return { color, radius }
}
Expand Down

0 comments on commit 4e8e71b

Please sign in to comment.