Author: zecas
Date: Wed Oct  7 08:37:59 2015
New Revision: 116

URL: http://svn.gna.org/viewcvs/zzzt?rev=116&view=rev
Log:
better ordered graph, and no more random colors

Modified:
    trunk/stats/daily.php

Modified: trunk/stats/daily.php
URL: 
http://svn.gna.org/viewcvs/zzzt/trunk/stats/daily.php?rev=116&r1=115&r2=116&view=diff
==============================================================================
--- trunk/stats/daily.php       (original)
+++ trunk/stats/daily.php       Wed Oct  7 08:37:59 2015
@@ -84,9 +84,9 @@
     ?>
 
     new Morris.Area({element: 'holder',
-                    lineColors: ['#<?php echo $db->rnd_color();?>',
-                                 '#<?php echo $db->rnd_color();?>',
-                                 '#<?php echo $db->rnd_color();?>'], 
+                    lineColors: ['#d92525',
+                                 '#33A61b',
+                                 '#0e3d59'], 
                      hoverCallback: function (index, options, content) {
                                          var row = options.data[index];
                                          return '<a href=index.php?day=' + 
row.j + "><?php echo DAY_PROD;?></a>" + content ;
@@ -100,13 +100,13 @@
                        <?php
                          for($i=0;$i<sizeof($values);$i++) {
                            echo "{ j: '".$jour[$i]."'";
+                           echo ", 't': ".$record[$i];
+                           echo ", 'm': ".$moyenne[$i];
                            echo ", 'r': ".$values[$i];
-                           echo ", 'm': ".$moyenne[$i];
-                           echo ", 't': ".$record[$i];
                            if($i<sizeof($values)-1) echo " },\n"; else echo " 
}\n";
                          }
                        ?>
-                       ], xkey: 'j', ykeys: ['r', 'm', 't'], labels: ['<?php 
echo PAC;?>', '<?php echo AVG;?>', 'Record'] });
+                       ], xkey: 'j', ykeys: ['t', 'm', 'r'], labels: ['<?php 
echo PAC;?>', '<?php echo AVG;?>', 'Record'] });
   
   </script>
   <noscript><img src=image_year.php?width=800&amp;height=500></noscript>


_______________________________________________
Zzzt-commits mailing list
Zzzt-commits@gna.org
https://mail.gna.org/listinfo/zzzt-commits

Reply via email to