Index: /trunk/ippMonitor/raw/czartool_ipptopsps.php
===================================================================
--- /trunk/ippMonitor/raw/czartool_ipptopsps.php	(revision 32817)
+++ /trunk/ippMonitor/raw/czartool_ipptopsps.php	(revision 32818)
@@ -53,5 +53,12 @@
 $columnHeaderColor = "lavender";
 
-if ($selectedLabel == "") { $selectedLabel = "ThreePi.V3_P2"; }
+$labels = getLabels($czardb);
+
+# if no label is selected, use first one in the list
+if ($selectedLabel == "") { 
+    
+    if (sizeof($labels) > 0) $selectedLabel = $labels[0]; 
+    else $selectedLabel = "no labels";
+}
 if ($selectedStage == "") { $selectedStage = "all_stages"; }
 if ($plotType == "") { $plotType = "linear"; }
@@ -73,5 +80,4 @@
 $table = "<table bgcolor=\"#FFFFFF\" width=\"700\" align=\"middle\" border=\"1\" cellspacing=\"0\" cellpadding=\"4\" style=\"font-size:80%\">\n";
 
-$labels = getLabels($czardb);
 
 if ($debug) {
@@ -161,5 +167,5 @@
 
     # order by descending priority as set in gpc1 database
-    $sql = "SELECT DISTINCT label FROM processed WHERE  timestamp >= now() - INTERVAL 1 DAY";
+    $sql = "SELECT DISTINCT label FROM processed WHERE  timestamp >= now() - INTERVAL 1 DAY ORDER BY label";
     if ($debug) {echo "$sql<br>";}
 
