diff --git a/README.md b/README.md index dc2e13b..fe0c848 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,6 @@ Examples: I've been using `vercel` for local dev. To load up a local server: `vercel dev`. -Note that this version creates a distribution from the 90th percentile on the contributions per day to stop the odd _really_ big days blowing out the scale. It also has a default minimum for non-zero contribition days (10% of the maximum height) +Note that this version creates a distribution from the 99th percentile on the contributions per day to stop the odd _really_ big days blowing out the scale. It also has a default minimum for non-zero contribition days (10% of the maximum height) diff --git a/js/contributions.js b/js/contributions.js index 055c67b..ac72910 100644 --- a/js/contributions.js +++ b/js/contributions.js @@ -207,11 +207,11 @@ const init = () => { if (day.count === json.min) { height = MAX_HEIGHT * 0.1 - } else if (day.count > json.min && day.count <= json.p90) + } else if (day.count > json.min && day.count <= json.p99) { - height = ((MAX_HEIGHT * 0.1) + (((MAX_HEIGHT * 0.8) / json.p90) * day.count)).toFixed(4) + height = ((MAX_HEIGHT * 0.1) + (((MAX_HEIGHT * 0.8) / json.p99) * day.count)).toFixed(4) } - else if (day.count > json.p90) + else if (day.count > json.p99) { height = ((MAX_HEIGHT * 0.9) + (((MAX_HEIGHT * 0.1) / json.max) * day.count)).toFixed(4) }