Skip to content
Browse files

narcissus: autoscale y for each graph, machines with max 2 builds/day…

… look weird, but such is life

Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
  • Loading branch information...
1 parent f7248be commit f11751baebe30eccf2136f0f9131f59183e8d714 @koenkooi koenkooi committed May 11, 2011
Showing with 2 additions and 4 deletions.
  1. +2 −4 graph.php
View
6 graph.php
@@ -23,7 +23,6 @@
$firstdate = time() + 500;
$lastdate = 0;
-$maxbuilds = 0;
$handle = fopen ("./deploy/stats.txt", "a+");
while ($stats = fscanf($handle, "%s %s\n")) {
@@ -74,7 +73,7 @@
if (isset($builds[$machine][$statsdate])) {
$buildcount = $builds[$machine][$statsdate];
$yvars[$machine] .= "[ $i, $buildcount ], \n";
- if($maxbuilds < $builds[$machine][$statsdate]) $maxbuilds = $builds[$machine][$statsdate];
+ if($maxbuilds[$machine] < $builds[$machine][$statsdate]) $maxbuilds[$machine] = $builds[$machine][$statsdate];
$didbuild[$machine] = 1;
} else {
$yvars[$machine] .= "[ $i, 0 ], \n";
@@ -88,8 +87,7 @@
"colorScheme": PlotKit.Base.palette(PlotKit.Base.baseColors()[0]),
"padding": {left: 0, right: 0, top: 10, bottom: 30},
"xTicks": [<? print $xticks; ?> ],
- "drawYAxis": false,
- "yAxis": [0, <?print $maxbuilds; ?>],
+ "drawYAxis": true,
"yTickPrecision": 0
};

0 comments on commit f11751b

Please sign in to comment.
Something went wrong with that request. Please try again.