From 230461efe6ef235585d6460d4e2a5df85ef857af Mon Sep 17 00:00:00 2001
From: Jared Hancock <gravydish@gmail.com>
Date: Mon, 18 Jun 2012 17:52:25 -0500
Subject: [PATCH] Fix (unnecessary) hangup on crunching graph plot data

---
 scp/dashboard.php | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

diff --git a/scp/dashboard.php b/scp/dashboard.php
index ef3854bee..5284c901c 100644
--- a/scp/dashboard.php
+++ b/scp/dashboard.php
@@ -137,7 +137,6 @@ span.label {
                     smtimes = Array.prototype.concat.apply([], json.times),
                     plots = [],
                     max = 0,
-                    steps = 0,
                     primes = [2,3,5,7,9];
 
                 // Convert the timestamp to number of whole days after the
@@ -147,15 +146,6 @@ span.label {
                 for (key in smtimes) {
                     smtimes[key] = Math.floor(smtimes[key] / 86400);
                 }
-                steps = smtimes[smtimes.length-1] - smtimes[0] + 1;
-                while (steps > 12) {
-                    for (var i in primes) {
-                        if (steps % primes[i] === 0) {
-                            steps /= primes[i];
-                            break;
-                        }
-                    }
-                }
                 for (key in json.events) {
                     e = json.events[key];
                     if (json.plots[e] === undefined) continue;
@@ -174,7 +164,7 @@ span.label {
                     nostroke: false, 
                     shade: false,
                     axis: "0 0 1 1",
-                    axisxstep: steps,
+                    axisxstep: 8,
                     axisystep: max,
                     symbol: "circle",
                     smooth: false
-- 
GitLab