Skip to content
Snippets Groups Projects
Commit 439697cf authored by Paolo.Brasolin's avatar Paolo.Brasolin
Browse files

feat: #be improve shot graph readability

parent f5676a04
No related branches found
No related tags found
No related merge requests found
...@@ -70,7 +70,7 @@ new Chart(document.getElementById("gamesByDateChart"), gamesByDateConfig); ...@@ -70,7 +70,7 @@ new Chart(document.getElementById("gamesByDateChart"), gamesByDateConfig);
const shotsByDurationData = JSON.parse( const shotsByDurationData = JSON.parse(
document.getElementById("shotsByDurationData").textContent, document.getElementById("shotsByDurationData").textContent,
); ).filter((item) => item.bucket != null);
const shotsByDurationConfig = { const shotsByDurationConfig = {
type: "bar", type: "bar",
......
...@@ -81,7 +81,7 @@ server.get("/", async (request, reply) => { ...@@ -81,7 +81,7 @@ server.get("/", async (request, reply) => {
.table("shots") .table("shots")
.select( .select(
connection.raw( 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") .groupBy("bucket")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment