Changeset 538 for trunk


Ignore:
Timestamp:
2008-03-02T07:05:02+01:00 (6 years ago)
Author:
moo
Message:

show hits for each hits graph column

Location:
trunk/admin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/xcache.css

    r535 r538  
    3131.hitsgraph { height: 20px; margin: auto; } 
    3232.hitsgraph div { float: left; width: 2px; height: 100%; } 
     33.hitsgraph div:hover { background: gray; } 
    3334.hitsgraph div div { float: none; width: 100%; } 
    3435.hitsgraph div div.barf { border: 0px solid gray; border-width: 1px 0 0 0; } 
  • trunk/admin/xcache.php

    r535 r538  
    152152} 
    153153 
    154 function bar_percent($percent, $active) 
     154function bar_hits_percent($v, $percent, $active) 
    155155{ 
    156156    $r = 220 + (int) ($percent * 25); 
     
    158158    $percent = (int) ($percent * 100); 
    159159    $a = $active ? ' active' : ''; 
    160     return '<div>' 
     160    return '<div title="' . $v . '">' 
    161161        . '<div class="barf' . $a . '" style="height: ' . (100 - $percent) . '%"></div>' 
    162162        . '<div class="barv' . $a . '" style="background: rgb(' . "$r,$g,$b" . '); height: ' . $percent . '%"></div>' 
     
    178178    $html = array(); 
    179179    foreach ($hits as $i => $v) { 
    180         $html[] = bar_percent($v / $max, $i == $t); 
     180        $html[] = bar_hits_percent($v, $v / $max, $i == $t); 
    181181    } 
    182182    return implode('', $html); 
Note: See TracChangeset for help on using the changeset viewer.