diff --git a/backend/public/dashboard.js b/backend/public/dashboard.js index cd9cd44f235fed5422a24d835634bdb05c785c88..a774950564c479ccb6398e34813b865fc24683d2 100644 --- a/backend/public/dashboard.js +++ b/backend/public/dashboard.js @@ -70,7 +70,7 @@ new Chart(document.getElementById("gamesByDateChart"), gamesByDateConfig); const shotsByDurationData = JSON.parse( document.getElementById("shotsByDurationData").textContent, -); +).filter((item) => item.bucket != null); const shotsByDurationConfig = { type: "bar", diff --git a/backend/src/index.ts b/backend/src/index.ts index e60436ff271aa3b21d185634efef1ffaf4a0bfa1..59ebc954e5d2cf2097beb9ccfd250c331bdee2da 100644 --- a/backend/src/index.ts +++ b/backend/src/index.ts @@ -81,7 +81,7 @@ server.get("/", async (request, reply) => { .table("shots") .select( connection.raw( - "width_bucket(ended_at_gmtm - began_at_gmtm, 0, 60*1000, 60*10)*100 as bucket, count(*)", + "width_bucket(ended_at_gmtm - began_at_gmtm, 0, 60*1000, 60*5)*200 as bucket, count(*)", ), ) .groupBy("bucket")