summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRomain d'Alverny <rda@mageia.org>2012-09-12 13:25:05 +0000
committerRomain d'Alverny <rda@mageia.org>2012-09-12 13:25:05 +0000
commit4875a716339a15d041d8c4bcddaa0bccaa8a39b6 (patch)
tree84a8c3a1d8267df3f19ef3cba67e9d36b0aa5598
parent8b615404a5fb0d193ad839adc7429d9f99905869 (diff)
downloadpkgsubmit-4875a716339a15d041d8c4bcddaa0bccaa8a39b6.tar
pkgsubmit-4875a716339a15d041d8c4bcddaa0bccaa8a39b6.tar.gz
pkgsubmit-4875a716339a15d041d8c4bcddaa0bccaa8a39b6.tar.bz2
pkgsubmit-4875a716339a15d041d8c4bcddaa0bccaa8a39b6.tar.xz
pkgsubmit-4875a716339a15d041d8c4bcddaa0bccaa8a39b6.zip
more concise scale labels
-rw-r--r--lib.php19
1 files changed, 10 insertions, 9 deletions
diff --git a/lib.php b/lib.php
index 819c3bb..58e1236 100644
--- a/lib.php
+++ b/lib.php
@@ -490,14 +490,15 @@ S;
$rows = array("['Duration', 'Builds']");
foreach ($newdata as $duration => $count) {
- if ($duration == '0 second')
- $duration = '< 1 minute';
- elseif ($duration == '10 minutes')
- $duration = '>= 10 minutes';
- elseif ($duration == '20 minutes')
- $duration = '>= 20 minutes';
- elseif ($duration == '60 minutes')
- $duration = '> 1 hour';
+
+ if ($duration == '0 second') { $duration = '<1'; }
+ elseif ($duration == '10 minutes') { $duration = '>10'; }
+ elseif ($duration == '20 minutes') { $duration = '>20'; }
+ elseif ($duration == '60 minutes') { $duration = '>60'; }
+ else {
+ $duration = explode(' ', $duration);
+ $duration = $duration[0];
+ }
$rows[] = sprintf("['%s', %d]", $duration, $count);
}
@@ -508,7 +509,7 @@ function draw_buildtime_chart() {
{$rows}
]);
var options = {
- title: 'How long are most of the builds?',
+ title: 'How long are most of the builds (in minutes)?',
hAxis: {title: 'Duration'},
'width':500,
'height':200,