mirror of
https://github.com/taigrr/skyline
synced 2025-01-18 04:33:13 -08:00
Tweak graph to 99th percentile smoothing.
This commit is contained in:
parent
6f187e59cb
commit
a189f6c881
@ -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)
|
||||
|
||||
|
||||
|
@ -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)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user