From 3fd1236933dbf64650ef6576466fc3dd3b5c4c15 Mon Sep 17 00:00:00 2001 From: Justin Lee <2025jlee@tjhsst.edu> Date: Mon, 10 Jun 2024 19:10:28 -0400 Subject: [PATCH] fix(eighth): correct stats dates --- intranet/static/js/eighth/statistics.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/intranet/static/js/eighth/statistics.js b/intranet/static/js/eighth/statistics.js index eaecaecf1ae..c4200a5b33f 100644 --- a/intranet/static/js/eighth/statistics.js +++ b/intranet/static/js/eighth/statistics.js @@ -22,14 +22,14 @@ $(document).ready(function() { datasets: [{ label: "A Block", backgroundColor: "rgba(200,100,100,0.5)", - data: $.map(parsedData, function(v) { - return "A" in v[1] ? v[1].A : null; + data: parsedData.filter((v) => "A" in v[1]).map((v) => { + return {x: v[0]._i, y: v[1].A}; }) }, { label: "B Block", backgroundColor: "rgba(100,100,200,0.5)", - data: $.map(parsedData, function(v) { - return "B" in v[1] ? v[1].B : null; + data: parsedData.filter((v) => "B" in v[1]).map((v) => { + return {x: v[0]._i, y: v[1].B}; }) }] };